You are here: HELP: PHP upgrade broke my code! « PHP SQL « IT news, forums, messages
HELP: PHP upgrade broke my code!

Posted by steveg1701 on 01/30/08 16:31

Hi, I hope one of you gurus out there can help me. I have a web
application that had been running fine before I upgraded my server,
now it fails on the following snippet of code:

function NextOrder($OrderID) {
ConnectDatabase();
$MyQuery = "SELECT OrderID FROM `Orders` WHERE (OrderID > $OrderID)";
$request = mysql_query($MyQuery);
list($Answer) = mysql_fetch_row($request);
echo "DEBUG next is ""$Answer""";
return $Answer;
}

When this code is interpreted it outputs this:

DEBUG next is ""

Not surprisingly, I have a companion routine that looks essentially
the same except for the < operator replacing > and sort order
descending - it fails in the same way. if however, for the purpose of
testing I replace the < with a = then the code works as expected;

Did I find a bug in PHP/MySQL somewhere or am I doing something wrong
that I was getting away with before and now getting my hand slapped by
smarter software? ;-)

The environment that this worked under is

PHP 5.2.0
SuSE 10.2 x586 32 bit
MySQL 5.0.26-12
PHP5-MySQL 5.2.0-10

Environment it failed under


PHP 5.2.4
SuSE 10.3 x86 64 bit
MySQL 5.0.45-22 x86 64 bit
PHP5-MySQL 5.2.4-10 x86 64 bit


Thanks in advance for any light you can shed on this!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация