Posted by:
stevenmartin99
(---.b-ras1.blp.dublin.eircom.net)
thats ok but mysql is very quick
anyway id use
while ($row = mysql_fetch_array($result))
{
if (in_array($keyword, $row, true))
{
echo "found";
}
else
{
echo "not found";
}
}
$result is the whole table in an array
$row is the current row it is processing as an array
$keyword is the users input
please not that it may find more then one row with a true state if the user input correspondes to more than one row
also this is actually slower then connecting to the database with the user input and searching as mysql is quicker then php at searching. php needs to go through each row and each key in the array
if you connect to mysql u could search an exact column(field) if you know what your looking for
Steven Martin
stevenmartin99@gmail.comstevenmartin99@hotmail.comPampServer.com - [
pampserver.com]
Edited 1 time(s). Last edit at 01/09/2009 10:21PM by stevenmartin99.