All pastes #834955 Raw Edit

Unnamed

public text v1 · immutable
#834955 ·published 2007-12-28 16:34 UTC
rendered paste body
if (!is_numeric($_POST['productsearch'])) {
print "this is a regular search</br>";
print "SELECT * FROM inventory where productname like '%{$_POST[productsearch]}%'";
$query = mysql_query("SELECT * FROM inventory where productname='%{$_POST[productsearch]}%'");
echo mysql_num_rows($query);
}

the query that is being submitted shows at this
SELECT * FROM inventory where productname like '%paint%'
where and when that query is submitted to the db it shows 2 results, but the php side shows 0