MySQL Forums
Forum List  »  PHP

Re: Error message disappeared but no data as yet
Posted by: john_chooiyoke
Date: March 21, 2007 01:42AM

Thanks for the advice. I did edit the statement from mysql_fetch_assoc() to mysqli_fetch_assoc() and the error message disappeared.

However, I am still not getting data from the database table. The adjusted code is as follows

$no = trim($_POST['no']);


$sql2 = "SELECT region, type, job, location, designation, description, wwwreg, wwwdesc, datecreated, datemodified, deleteforwww, moreinformation FROM openings where no='$no'";

$result2 = mysqli_query($cxn, $sql2)

or die("Query Failed: ".mysqli_error($cxn));


$row = mysqli_fetch_assoc($result2);


I am not getting an error message i.e. it did not trigger off the 'die'. All the application continued to do was display the form without data in the fields - which tells me nothing came back from the table.

I've checked the SQL which was placed in $sql2 - so why is no data coming back. I have also echoed $result 2 and it came back with "Object Id #2' - what does that mean?

Pls assist

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.