Koutaru
03-29-2005, 07:54 AM
This is the strangest thing I've ever seen. A .php which was working earlier now doesn't work and backups won't help either.
Basically, the file won't open. There is no 404 error, it simply won't display and eventually, timeout.
If I change the code
$getstocks = $DB_site->query("SELECT stockname,symbol FROM ".TABLE_PREFIX."stocks WHERE active=1 ORDER BY symbol");
to (very small change, get rid of the _first)
$getstocks = $DB_site->query_first("SELECT stockname,symbol FROM ".TABLE_PREFIX."stocks WHERE active=1 ORDER BY symbol");
The file actually opens. However, the next line fails to work:
while ($stock = $DB_site->fetch_array($getstocks))
{
#MORE CODE HERE
}
Even though it looks perfectly fine. This exact code appears again exactly in another DO request and works fine but this one....
I'm starting to think it's server related but why this would happen on the server is beyond me. It's really puzzling and sinve I've spent hours over this, I'm at my wit's end.
Help?
Basically, the file won't open. There is no 404 error, it simply won't display and eventually, timeout.
If I change the code
$getstocks = $DB_site->query("SELECT stockname,symbol FROM ".TABLE_PREFIX."stocks WHERE active=1 ORDER BY symbol");
to (very small change, get rid of the _first)
$getstocks = $DB_site->query_first("SELECT stockname,symbol FROM ".TABLE_PREFIX."stocks WHERE active=1 ORDER BY symbol");
The file actually opens. However, the next line fails to work:
while ($stock = $DB_site->fetch_array($getstocks))
{
#MORE CODE HERE
}
Even though it looks perfectly fine. This exact code appears again exactly in another DO request and works fine but this one....
I'm starting to think it's server related but why this would happen on the server is beyond me. It's really puzzling and sinve I've spent hours over this, I'm at my wit's end.
Help?