But for last week, i just got a project from my boss and it is using PHP. Although i just need to supervised the project but i need to know how to it is going to be done.
So, i will put this code as a quick reference for me
$dbConn = new mysqli('localhost', 'root', '', 'samplestaff');
$sql="select staffno, staffname from staffdetails";
$query01=$dbConn->prepare($sql);
$query01->execute();
$query01->bind_result($staffno, $staffname);
while($query01->fetch()){
echo $staffno.":".$staffname."
";
}
?>
No comments:
Post a Comment