Mr Tuition
01-23-2008, 04:16 PM
hi, I have a querry php/sql (and Im a bit of an sql noob)
$data = mysql_query("
SELECT Name, Summ, title, URL, Location, Subject, ImgHeight, ImgWidth,
MATCH(Name, Summ, title, Location, Subject)
AGAINST ('$srch' IN BOOLEAN MODE) AS score FROM Users
WHERE MATCH(Name, Summ, title, lDescription, Location, Subject)
AGAINST ('$srch' IN BOOLEAN MODE)
ORDER BY score DESC LIMIT 20
")
or die(mysql_error());
}
how can I now refine $data further, to only contain results where a column (_postcode) from another table (which also conatins 'Name') starts with OX
$data = mysql_query("
SELECT Name, Summ, title, URL, Location, Subject, ImgHeight, ImgWidth,
MATCH(Name, Summ, title, Location, Subject)
AGAINST ('$srch' IN BOOLEAN MODE) AS score FROM Users
WHERE MATCH(Name, Summ, title, lDescription, Location, Subject)
AGAINST ('$srch' IN BOOLEAN MODE)
ORDER BY score DESC LIMIT 20
")
or die(mysql_error());
}
how can I now refine $data further, to only contain results where a column (_postcode) from another table (which also conatins 'Name') starts with OX