LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-23-2005, 09:29 AM   #1
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Query works in MySQLCC but not in PHP?


Hi guys,

Why is this valid syntax in the mysql command line client:

select t1.id from akl_lng_shows_link_table as t1, akl_afr_shows as t2, akl_shows_genres_afr as t3 where t1.afr_id = t2.id and t2.genre_id = t3.id order by t3.name asc

retunrs the correct result, but in PHP 4.3.4 it returns

[Polarserver] ERROR 1064: 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 ''
?

It seems that PHP does not support alias-selecting in MySQL queries?

Any help appreciated!

Thanks...
 
Old 05-23-2005, 01:30 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
By the error it sounds more like you have an extra quote somewhere or there is no query being sent to the server - can you copy and paste the php code.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Query MS SQL from remote php simon@saq.co.uk Linux - General 2 10-17-2005 09:44 AM
php: Why Can't I Query Mysql DB?? flamesrock Programming 7 11-16-2004 12:36 AM
PHP Query fuelinjection Programming 1 07-16-2004 12:34 PM
PHP MySQL Query Question vi0lat0r Programming 1 07-15-2004 05:02 AM
php/postgresl insert query BobNz Programming 2 05-13-2004 10:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration