CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 strage problem backslashes" \"

Print topic Send  topic

Author Message
mihaiparjolea

Posts: 2
Posted: 06/07/2012, 1:03 AM

hy
i have this code:
SELECT , invoices.*, DATEDIFF(\".CCToSQL(date('Y-m-d', strtotime(CCFormatDate(CCParseDate(CCGetParam(dateraport', ''),array('dd',' ','mm',' ','yyyy')), array('yyyy','-','mm','-','dd')))), ccsDate).\",data_two) AS days1,\n\n" .
when i use with \" result day1 empty
when i remove the \ from code days1 are correct .....
how can i use the correct code ( with \" ) and the result days1 = correct ?

thanks
View profile  Send private message
Lucius

Posts: 220
Posted: 06/07/2012, 6:04 AM

Hi

Correct code is not the one with \", but one with only qoutes.

The backslash is an escape character, so in the example you quoted, everything you wrote is passed to SQL verbatim, including the PHP code.

You should use the backslash when you need the quotes in SQL, for example:

SELECT * FROM table WHERE x = ' \" ' ;

View profile  Send private message
mihaiparjolea

Posts: 2
Posted: 06/07/2012, 10:50 PM

ok, and how do this ? becouse this code is generate by codechargestudio
me i write :
DATEDIF(".
- and my select works fine if i remove manualy the \ after ccs generate
and codecharge transform in
DATEDIF(\".
- and my select don't works fine , and is frustating to change any time the final code
View profile  Send private message
Lucius

Posts: 220
Posted: 06/12/2012, 4:04 AM

The above SQL is generated by CCS ?

Can you please write what you do (which functionality you use) that will generate SQL code like:

SELECT , invoices.*, DATEDIFF(\".CCToSQL(date('Y-m-d', strtotime(CCFormatDate(CCParseDate(CCGetParam....
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.