SQL Query with %

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 68966
interpreted = N
texte = Every time I try to use [sqlexecute] with a query containing the percent sign, it fails. What is the workaround here? This query works fine in phpMyAdmin, but fails in WebDNA: [text]beginYear=[format days_to_date %Y-%m-%d][math]{01/01/[date %Y]}[/math][/format][/text] [text]endYear=[format days_to_date %Y-%m-%d][math]{12/31/[date %Y]}[/math][/format][/text] [sqlexecute conn_ref=conn1&result_var=rs1]SELECT * from consumers WHERE DATE_FORMAT(POSTDATE, '%Y-%m-%d') >= '[beginYear]' AND DATE_FORMAT(POSTDATE, '%Y-%m-%d') <= '[endYear]';[/sqlexecute] ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: SQL Query with % ( Clint Davis 2007)
  2. SQL Query with % ( Clint Davis 2007)
Every time I try to use [SQLexecute] with a query containing the percent sign, it fails. What is the workaround here? This query works fine in phpMyAdmin, but fails in WebDNA: [text]beginYear=[format days_to_date %Y-%m-%d][math]{01/01/[date %Y]}[/math][/format][/text] [text]endYear=[format days_to_date %Y-%m-%d][math]{12/31/[date %Y]}[/math][/format][/text] [sqlexecute conn_ref=conn1&result_var=rs1]SELECT * from consumers WHERE DATE_FORMAT(POSTDATE, '%Y-%m-%d') >= '[beginYear]' AND DATE_FORMAT(POSTDATE, '%Y-%m-%d') <= '[endYear]';[/sqlexecute] ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Clint Davis

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[ot] Any One Want A WebDNA Billing Program? (2003) cookies and [returnraw] (1997) OT: FTP problems (2003) PCS Frames (1997) RE: Can a database get stomped by simultaneous access? (1997) Explorer 3.0 (1997) No Wanna Duppys (1998) WebDNA Solutions ... sorry! (1997) convertWords... NEW (2001) security (1997) [WebDNA] Search Problem (2011) IE 5 Mac Authentication trouble (2000) A little syntax help (1997) WebCat2b13MacPlugIn - syntax to convert date (1997) Old $ commands and migration (2004) Search on encrypted field (2000) My new discussion forum (2003) Mass Mail (2000) Sort Order on a page search (1997) Sku numbers (1997)