I've run into a serious problem, and can't seem to find the issue in my somewhat simple code.
I've got a database and I update it with concert listings.
I need to check if the new updates are already in the db, and the code I have is currently a mess so I decided to try using array_diff to find the new vs. old shows.
Getting the list of updates into an array is no problem, but getting the list of shows from my db into array format so that I can compare the two is proving to be quite difficult.
I've pinned down the error to be somewhere in the following code, but I can't seem to see anything that would cause anything to be written to my drive.
I'd point to the dev code, but that would kill my 'puter, so I can't do that.
The sql executes flawlessly and quickly, so that is not the answer.
However, the page will never finish loading.
Expand|Select|Wrap|Line Numbers
- $resultShowExist = mysql_query($doesShowExist) or die('could not find if show exists');
- $showsListFromDb=array();
- while($checkShowExist = mysql_num_rows($resultShowExist)){
- $showTitle=$checkShowExist['title'];
- $showAddress=$checkShowExist['address'];
- $showCity=$checkShowExist['city'];
- $showState=$checkShowExist['state'];
- $showZip=$checkShowExist['zip'];
- $showDate=$checkShowExist['date'];
- $showTime==$checkShowExist['time'];
- $mysqlShowsToArray=$showDateTime .' '. $showTime.','. $showTitle.','. $showAddress.','. $showCity.','. $showState.','. $showZip;
- echo $mysqlShowsToArry.'<br>';
- array_push($showsListFromDb, $mysqlShowsToArray);
- }
- echo"shows List from DB <br>";
- print_r($showsListFromdb);