Okay.. so ive been looking around on the web for hours now trying to figure out how to convert my old mysql
Here is my php code atm
$sql2="SELECT * FROM $tbl_name_question2 WHERE question_id='$question_id_comments' ORDER BY a_id ASC";
$result2=mysql_query($sql2);
// Comment Loop Starts
while($rows=mysql_fetch_array($result2)){
?>
<div class="row comment-body">
<div class="col-md-3">
<p><? echo $rows['a_name']; ?></p>
<span><? echo $rows['a_datetime']; ?></span>
</div>
<div class="col-md-9">
<p><? echo $rows['a_answer']; ?></p>
</div>
</div>
<?php } // Comment Loop Ends ?>
I have the database connection info already setup properly as I wrote a MySQLi prepared statement to insert content which works, however I cannot figure this one out.
$datetime=date("m/d/y h:i"); // Format Date And Time
// Connect
$mysqli = new mysqli('private', 'private', 'private', 'private');
// Check Connection
if (mysqli_connect_errno()) {
printf("Connect failed: %s
", mysqli_connect_error());
exit();
}
If someone could show me in the correction direction or show me how to convert this it would be more than appreciated!
Huge thanks in advance!