Jump to content

Archived

This topic is now archived and is closed to further replies.

capone

script works php4 but not php5?

Recommended Posts

This script work fine under php4 but not under php5. i think $db->next_record() is no longer supported under php 5 how can i rework this script to work under php 5? i tried $row=$db->fetch_assoc($row) in the while statement and i get Fatal error: Call to undefined method DB_Sql::fetch_assoc().

 

 

$db->query($sqlL);

 

if($db->next_record()) {

do

{

      $fldid = $db->f("job_id");

  $fldtitle = $db->f("title");

$flddesc = $db->f("j_desc");

$fldsal = $db->f("sal");

$fldedu = $db->f("edu");    

$fldloc = $db->f("loc");

$fldreq = $db->f("req");

$fldbenef = $db->f("benef");

$fldcomp = $db->f("comp_id");

$tpl->set_var("id", $fldid);

    $tpl->set_var("jtype", tohtml($fldtitle));

$tpl->set_var("desc", tohtml($flddesc));

    $tpl->set_var("sal", tohtml($fldsal));

    $tpl->set_var("edu", $fldedu);

$tpl->set_var("loc", tohtml($fldloc));

$tpl->set_var("req", tohtml($fldreq));

$tpl->set_var("bene", tohtml($fldbenef));

$tpl->set_var("comp", tohtml($fldcomp));

//$tpl->parse("RList", false);

    } while($db->next_record());

  }

Share this post


Link to post
Share on other sites

What errors are output?

 

(If none are output, put error_reporting(E_ALL); and ini_set('display_errors', 'on'); at the top)

Share this post


Link to post
Share on other sites

I don't get any errors just no data, the html columns show up just no data appears. I know my template code is working I get rows being output there just nothing in them.I made sure to populate the Dbase has anyone used mysql next record in their code with php5?

Share this post


Link to post
Share on other sites

Oh my bad.  You told me the errors up above x.x.  I'm apparently blind.

 

Mysql next record?  MSSQL you mean?

 

Where did this Db_Sql object come from?

Share this post


Link to post
Share on other sites

there is a php syntax for mysql interaction; mysql_next_record() pulls up next record in dbase it just doesn't seem to work under php5 as far as the object error -completely clueless

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.