I am trying to search for rows containing some values. I have tried out the variables, so they are right. The problem is that I don't get any results if I enter a value in $indata. If I just press search on the form I get all values but never when my inputbox contains a value.
here's the search code;
$result= mysql_query("SELECT * FROM likvid WHERE '$find' like '%$indata%' ORDER BY '$sort'",$db);
I'm new to this but "likvid" is my table, $find is a column, and $indata is the result of an inputfield. $sort is another column. I've tested these values and they are right. Here's the print code;
while ($myrow = mysql_fetch_array($result)) {
printf("<a href=http://www.phpbuilder.com/board/archive/index.php/\"%s?id=%s\">%s %s</a><br>\n", $PHP_SELF, $myrow["ID"], $myrow["NAMN"], $myrow["BOKARE"]);
}
Thankful for any help!
here's the search code;
$result= mysql_query("SELECT * FROM likvid WHERE '$find' like '%$indata%' ORDER BY '$sort'",$db);
I'm new to this but "likvid" is my table, $find is a column, and $indata is the result of an inputfield. $sort is another column. I've tested these values and they are right. Here's the print code;
while ($myrow = mysql_fetch_array($result)) {
printf("<a href=http://www.phpbuilder.com/board/archive/index.php/\"%s?id=%s\">%s %s</a><br>\n", $PHP_SELF, $myrow["ID"], $myrow["NAMN"], $myrow["BOKARE"]);
}
Thankful for any help!