Jump to content

Recommended Posts

Query:

SELECT UMTS_napetude_cell.parent, UMTS_napetude_nodeb.idnap FROM 
UMTS_napetude_cell LEFT JOIN UMTS_napetude_nodeb
ON UMTS_napetude_cell.parent IS NOT LIKE CONCAT('%',UMTS_napetude_nodeb.idnap,'%')
WHERE UMTS_napetude_cell.parent IS NOT NULL

Error:

 

#1064 - You have an error in your SQL syntax near 'LIKE CONCAT('%', UMTS_napetude_nodeb.idnap,'%')
WHERE UMTS_napetude_cell.parent ' at line 3

 

 

Thanks in advanced.

Link to comment
https://forums.phpfreaks.com/topic/281601-left-join-with-not-like/
Share on other sites

ok, you still didn't answer the first part of the question, do you only get that message when removing the IS.

 

Is this a php based application, is error reporting on? or can you turn it on and do you get any errors?

 

the query could be returning null which is resulting the script to fail. This is all an assumption as I dont know anything about the application.

Connection errors usually indicate timeouts or resultsets that are too large to handle.

 

Using LIKE on a string that starts with an % sign is painfully slow. If the query takes too long to complete, the server or the connection might timeout.

 

How long does the query run before you get this error?

If timeouts aren't the problem then there are two options left; either the resultset is too big (try doing a count() without selecting any columns, and see how many rows the query expectes to return) or the query is causing the MySQL backend to crash, although I would expect an error like "server has gone away" when that happens. However, this is MySQL, nothing is ever what you expect it to be :-)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.