NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Simple SQL not working!

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 03-29-2006, 03:17 PM THREAD STARTER               #1 (permalink)
SQLdumpster.com
 
Encenta.com's Avatar
Join Date: Jun 2005
Location: West Sussex, UK
Posts: 573
Encenta.com has a spectacular aura aboutEncenta.com has a spectacular aura about
 




Simple SQL not working!


Am I getting stupid in my young age or is my host just [insert rude word here]?

I've had many problems with my host so far and this is the second (simple) MySQL problem I've had today.

PHP Code:
$query mysql_query"SELECT * FROM certificates WHERE unique='1' ORDER BY title ASC" ) or die("SELECT Error: " .mysql_error()); 
Returns:

Quote:
SELECT 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 'unique='1' ORDER BY title ASC' at line 1
Hopefully I'm just stupid. Thanks.


Furthermore: when I changed 'unique' to 'category', it worked fine. These two fields are identical in the database (including properties) so the only way it could be wrong is if 'unique' is not spelt the same way it is in the database and i've checked it billions of times.
__________________
Encenta - Amazon Associates CMS
Last edited by Encenta.com; 03-29-2006 at 03:49 PM.
Encenta.com is offline  
Old 03-29-2006, 03:57 PM   #2 (permalink)
NamePros Member
Join Date: Mar 2006
Posts: 30
TheLimey is an unknown quantity at this point
 



"unique" is a mysql keyword.

Try changing the field name to is_unique or similar.
__________________
DNS Arena - Low cost domains. Reseller accounts at $8.75.
TheLimey is offline  
Old 03-29-2006, 04:04 PM THREAD STARTER               #3 (permalink)
SQLdumpster.com
 
Encenta.com's Avatar
Join Date: Jun 2005
Location: West Sussex, UK
Posts: 573
Encenta.com has a spectacular aura aboutEncenta.com has a spectacular aura about
 




Muchas gracias amigo. Rep added!
__________________
Encenta - Amazon Associates CMS
Encenta.com is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 12:22 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger