so my hosting company just upped our PHP version to 4.3.8 and suddenly all of my database calls (MySQL) using PEAR DB seem to need re-writing!
i'm going crazy. i'm fearing i have to re-code my site and i'm going nuts figuring out the "right" way to code.
for example, this used to work on PHP 4.3.3:
<?php
// write query
$sql = "select Code, Full_Name FROM Country" ;
// process query
$queryexe = $db->query($sql);
// loop for each country
while($result = $queryexe->fetchRow(DB_FETCHMODE_OBJECT))
{
$Code = $result->Code;
$fullname = $result->Full_Name;
print("<option value='$Code'>$fullname</option>") ;
}
?>
but now, NOPE!
it produces no error, but rather simply leaves a bunch of empty select fields.
THIS my hosting company found, does work:
<?php
// write query
$sql = "SELECT Code, Full_Name FROM Country;" ;
// process query
$queryexe = $db->query($sql);
// loop for each country
while ($row = $queryexe->fetchRow ())
{
echo '<option value="' . $row[0] . '">' . $row[1] . '</option>' ;
}
?>
subtle change, but i'm going nuts thinking i have to re-figure out how to code my DB calls! PEAR DB was already cryptic and undocumented as it was! i'm no veteran here!
anyone know a good source of info to help me?
anyone experience the same?
thanks!