View Single Post
Old 10-04-2007, 10:36 PM   #5 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Change

PHP Code:
$result mysql_query("SELECT * FROM resumes WHERE MATCH (body) AGAINST ('%search%')"); 
to

PHP Code:
$result mysql_query("SELECT * FROM resumes WHERE MATCH (body) AGAINST ('".%$search%."')"); 
You forgot to add the variable $search, right now you're not searching for the input search, you're actually search for the word "search".

PHP Code:
while($r=mysql_fetch_array($result)) 
to

PHP Code:
while($r=mysql_fetch_array($resultMYSQL_ASSOC)) 
PHP Code:
$lastname=$r["lastname"];
$body=$r["body"];
$id=$r["id"]; 
to

PHP Code:
$lastname=$r['lastname'];
$body=$r['body'];
$id=$r['id']; 
Eventhough it won't make much difference, it's still the most used way to go..

Also, don't use html breaklines, use xhtml breaklines:
Code:
<br />
Tanax is offline  
Reply With Quote