CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 SQL LIMIT Error

Print topic Send  topic

Author Message
bowtellj

Posts: 65
Posted: 09/18/2007, 3:54 AM

I modified the sql to show a random image. I am getting the following error. Going by the manual my syntax is correct. Any Ideas? If I remove LIMIT things work OK as the area is only setup for one image. I thought using LIMIT would be more efficient...Am I wrong?

SQL:
SELECT ImageTitle, ImageName FROM Projects_Images Where StatusID = 1 ORDER By RAND() LIMIT 1

Error:
Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; LIMIT 0,2' at line 1
_________________
Thanks

James

Just another Newbie! - Apache 2.24, PHP 5.2.3, MySQL 5.0.41, Windows XP SP2. CCS 3.2.0.2/4.0.2
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.

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.