Jump to content

unusual break in sql


otuatail

Recommended Posts

Hi I have a query that returns 1 but in a direct DB query but 0 on the web page. The query is

select Count(*) As val FROM Replies WHERE Submitted = '$UID'   AND thread = '$Thread';

 

On the page I get a return value of 0. when I echoed the query and pasted it directly into db it confirmed zero. On closer inspection the query has been spliced.

 

select Count(*) As val FROM Replies WHERE Submitted = '8d90afbc4c3fa30e81eff74460c2b42e
' AND thread = 'd1bc454d4050cb37f0f9bab21d3c0062';

 

the closing apostraphy is on the next line. putting it back into place and direct into the DB it is back to 1.

Is there a reason for this unusual break as I can't understand why the query could ever fail.

 

 

Link to comment
Share on other sites

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.