In a loop, the following function is executed twice in a row:
function CodeToURLImg($code) { $sql_catalog = 'SELECT Image FROM Message57 WHERE ItemID=' . $code; $query_catalog = mysql_query($sql_catalog); $row_catalog = mysql_fetch_array($query_catalog); $massiv = explode(":", $row_catalog[Image]); $CodeToURLImg = '/netcat_files/' . $massiv[3]; return $CodeToURLImg; } The first time returns a normal value, the second time it returns an error:
Warning: mysql_fetch_array () expects parameter 1 to be resource, given in /home/a/aas2ra/aas2ra.bget.ru/public_html/netcat/full.php(127): eval () 'd code on line 101
After turning on the display of errors, I also saw an error like this:
Notice: Constant Image - assumed 'Image' in /home/a/aas2ra/aas2ra.bget.ru/public_html/netcat/full.php(127): eval () 'd code on line 121
Both times the value in the function is passed the same. How to fix it?