CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Events Tutorial SQL Error

Print topic Send  topic

Author Message
WizyWyg
Posted: 07/25/2002, 1:37 PM

I've tried the Events tutorial 5 times and I still dont know what is causing this error:

Database error: Invalid SQL: select e.event_date as e_event_date, e.event_name as e_event_name, e.location_id as e_location_id, l.location_id as l_location_id, l.location as l_location from events e, locations l where l.location_id=e.location_id AND (is_active=1) AND (e.location_id=3) AND event_date >= #2002-07-25# order by e.event_date Asc
MySQL Error: 1064 (You have an error in your SQL syntax near '' at line 1)
Session halted.


This is for populating the Events grid with the events listing from the db. Anyone have an idea?
WizyWyg
Posted: 07/26/2002, 6:10 PM

^bump^
Nicole
Posted: 07/30/2002, 12:43 AM

Hello,
if you read tutorial attentively you should mentioned that only Access db requires date values to be surrounded with hashes. MySQL dates are to be surrounded with single quotes, e.g.:
AND event_date >= '2002-07-25'

So the replace() code in Open event is unnecessary once you work with mysql. Comment or remove it and check the type of the Input parameters date_start and date_end is set to Date.

   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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