For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > February 2006 > RE: [PHP-DB] Help Needed with malfunctioning query









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PHP-DB] Help Needed with malfunctioning query
Chris Payne

2006-02-26, 3:55 am

Hi there,

I'm using asd just to test the search, here's the output from the statement
echoed to the screen:

SELECT word,def,photo, if(locate('asd',word),1,2) as meFirst
,MATCH(word,def) AGAINST ('asd' IN BOOLEAN MODE) AS m FROM dictionary WHERE
MATCH(word,def) AGAINST ('asd' IN BOOLEAN MODE) ORDER BY meFirst, word LIMIT
0, 25

Chris

>This line of code USED TO WORK but now it gives me a Coudln't Execute
>Query
>error:
>
>$query2 = "SELECT word,def,photo MATCH(word,def) AGAINST
>('$txtsearchword'
>IN BOOLEAN MODE) AS m FROM dictionary WHERE MATCH(word,def) AGAINST
>('$txtsearchword' IN BOOLEAN MODE) LIMIT $offset, $item_perpage";


What is the exact error phrase? Did you echo the $sql statement so you can
see if the variables are correct?


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com