Problem with MySQL Query

Reply

Join Date: Apr 2005
Posts: 8
Reputation: dsgnews is an unknown quantity at this point 
Solved Threads: 0
dsgnews dsgnews is offline Offline
Newbie Poster

Problem with MySQL Query

 
0
  #1
Apr 18th, 2005
Hi Friends, I need your help.
Whenever I do a query on localhost it retrieves a value, but when I try on live it shows an error? What could be the problem?
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 158
Reputation: nicentral is an unknown quantity at this point 
Solved Threads: 4
nicentral's Avatar
nicentral nicentral is offline Offline
Junior Poster

Re: Problem with MySQL Query

 
0
  #2
Apr 18th, 2005
What do you mean by live?
Nobody believes the official spokesman, but everybody trusts an unidentified source.

-- Please do not PM me with questions about a thread. If you respond to a thread, then everyone can benefit.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 8
Reputation: dsgnews is an unknown quantity at this point 
Solved Threads: 0
dsgnews dsgnews is offline Offline
Newbie Poster

Re: Problem with MySQL Query

 
0
  #3
Apr 18th, 2005
live I mean server
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 158
Reputation: nicentral is an unknown quantity at this point 
Solved Threads: 4
nicentral's Avatar
nicentral nicentral is offline Offline
Junior Poster

Re: Problem with MySQL Query

 
0
  #4
Apr 18th, 2005
Ok, tell me if I am correct here. WHen you query the database from the local server, you get results, but when you query it from a remote server you get an error. Is this correct?
Nobody believes the official spokesman, but everybody trusts an unidentified source.

-- Please do not PM me with questions about a thread. If you respond to a thread, then everyone can benefit.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 8
Reputation: dsgnews is an unknown quantity at this point 
Solved Threads: 0
dsgnews dsgnews is offline Offline
Newbie Poster

Re: Problem with MySQL Query

 
0
  #5
Apr 19th, 2005
The error is as follows:

SELECT *
FROM room
WHERE room_no NOT
IN (
SELECT R.room_no
FROM room R, Booking B
WHERE R.room_no = B.room_no AND R.room_type = 'single' AND
B.arrival_date = '2005-03-16' AND B.departure_date = '2005-03-19'
)

LIMIT 0 , 30

#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
'SELECT R.room_no
FROM room R, Booking B
WHERE R.room_no = B.room
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 158
Reputation: nicentral is an unknown quantity at this point 
Solved Threads: 4
nicentral's Avatar
nicentral nicentral is offline Offline
Junior Poster

Re: Problem with MySQL Query

 
0
  #6
Apr 19th, 2005
without knowing the schema, the only suggestion I can give you is to try the subquery on its own. If this doesn't work, then you have an issue with your subquery. Try the select subquery withtout the where clause. Basically, break the query down into manageable steps.

Andy
Nobody believes the official spokesman, but everybody trusts an unidentified source.

-- Please do not PM me with questions about a thread. If you respond to a thread, then everyone can benefit.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 121
Reputation: jwshepherd is an unknown quantity at this point 
Solved Threads: 5
jwshepherd's Avatar
jwshepherd jwshepherd is offline Offline
Junior Poster

Re: Problem with MySQL Query

 
0
  #7
Jun 16th, 2005
make sure your database connection string is for remote access and not limited to local.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 2
Reputation: izzi is an unknown quantity at this point 
Solved Threads: 0
izzi's Avatar
izzi izzi is offline Offline
Newbie Poster

Re: Problem with MySQL Query

 
0
  #8
Aug 5th, 2008
How to maximaize the execution of mysql, coz i use a very large database. everytime i do query always comes up with maximum execution of 60 seconds elapse.., cant stand of that. is ther some way ??
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC