User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 391,590 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,678 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser:
Views: 2830 | Replies: 7
Reply
Join Date: Apr 2005
Posts: 8
Reputation: dsgnews is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
dsgnews dsgnews is offline Offline
Newbie Poster

Problem with MySQL Query

  #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?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: Milwaukee, WI
Posts: 156
Reputation: nicentral is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 3
nicentral's Avatar
nicentral nicentral is offline Offline
Junior Poster

Re: Problem with MySQL Query

  #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  
Join Date: Apr 2005
Posts: 8
Reputation: dsgnews is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
dsgnews dsgnews is offline Offline
Newbie Poster

Re: Problem with MySQL Query

  #3  
Apr 18th, 2005
live I mean server
Reply With Quote  
Join Date: Apr 2005
Location: Milwaukee, WI
Posts: 156
Reputation: nicentral is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 3
nicentral's Avatar
nicentral nicentral is offline Offline
Junior Poster

Re: Problem with MySQL Query

  #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  
Join Date: Apr 2005
Posts: 8
Reputation: dsgnews is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
dsgnews dsgnews is offline Offline
Newbie Poster

Help Re: Problem with MySQL Query

  #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  
Join Date: Apr 2005
Location: Milwaukee, WI
Posts: 156
Reputation: nicentral is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 3
nicentral's Avatar
nicentral nicentral is offline Offline
Junior Poster

Re: Problem with MySQL Query

  #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  
Join Date: Jun 2005
Location: Texas
Posts: 120
Reputation: jwshepherd is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 5
jwshepherd's Avatar
jwshepherd jwshepherd is offline Offline
Junior Poster

Re: Problem with MySQL Query

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

Re: Problem with MySQL Query

  #8  
16 Days Ago
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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

DaniWeb Database Design Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Database Design Forum

All times are GMT -4. The time now is 11:11 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC