Jump to content

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());

  }

Link to comment
https://forums.phpfreaks.com/topic/116057-script-works-php4-but-not-php5/
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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.