I have a bash-sctipt running 5 php scripts via wget. Every php file is called but, on the last script, I get this warning:
mysql_query(): supplied argument is not a valid MySQL-Link resource in xyz.php, on line ABC
What it is really strange is, if I run the same script via browser, the script runs fine, without any warning.
This is my code near line ABC:
$sqlSTR="INSERT INTO accounts_cstm (id_c, mtk_categoriascompradas_c) VALUES ('". $arr[1] . "', '" . $arr[0] . "')
ON DUPLICATE KEY UPDATE mtk_categoriascompradas_c= concat(mtk_categoriascompradas_c, '^,^$arr[0]')";
$ExecuteSQL = mysql_query ($sqlSTR, $DBConn) or
die ($sqlSTR); //warning on this line - line ABC
My SQL is totally valid (if I run the query that is outputed in the "die" statement it runs perfectly), the DBConn is connected to the database and all other scripts run fine, except this one.
I really don't know what is causing this Warning. Any help will be welcome.
Thanks