Why does it give above mentioned error?
Here's the code:
$replace = str_replace(", "," | ", $result2);
while ($line = mysql_fetch_array($result2, MYSQL_BOTH)){
mysql_query("INSERT INTO listings
Why does it give above mentioned error?
Here's the code:
$replace = str_replace(", "," | ", $result2);
while ($line = mysql_fetch_array($result2, MYSQL_BOTH)){
mysql_query("INSERT INTO listings
You are using a string function on a resource. PHP is weakly typed so it lets you get away with it in the short term (no runtime error), but it is done by converting the resource to string first, then doing the substitutuin. So it is not a resource anymore.
mysql_fetch_array() needs a valid mysql ressource as the first parameter. You can not use a str_replace() in a MYSQL ressource. So I assume that $result2 is not a mysql ressource.
$result2 should be generated with a mysql_query().
Guess you did not read all comments and answers in your own question (duplicate one)? You already got answer from me about this problem there but yo're too lazy to read, right?
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in
Close it down!