What version of PHP are you using? 5.4 is required if you intend to use Traversable on the mysqli_result (ie: the for each call).
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Yes, you can use a while loop, but not a foreach unless you upgrade to 5.4.
I wish they wouldn't change something like Traversable unless its in a major version; minor versions simply create confusion.
Edit:
Wait I'm wrong here. The foreach is already the results of a fetch_assoc call. I thought that was the result of the mysqli_result.
In that case, you're simply missing your while loop. Looks to me that you'll likely have a normalization issue as well since I see you exploding on ||.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Read the edit I put up there, you're missing your while loop. You cannot loop a resultset using a foreach in 5.3 and mysqli_result.
I misunderstood the purpose of the foreach you have here.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
yes, all working now. thanks again, and best of all it is less than half the code i started with after i had a rethink on the method i was using to locate missing images.