A lot of people have been telling me to get over mysql_* and get to either mysqli or PDO.
For a start I have choosen Mysqli as it seems very simliar.
However I've run into a problem while converting my site.
I can't seem to find the equivalent of getting my data like this: mysql_result($result, $i, 'COL 2')
The code below is what it looks like now, however I can't seem to find a way to get my data like I did with mysql_*.
I'm doing like this:
<?php
$sql="SELECT * FROM items";
$result=mysqli_query($GLOBALS["___mysqli_ston"], $sql);
for ($i = $start; $i < $end; $i++) {
if ($i == $total_results) {
echo '
<div class="col-sm-12 col-lg-12 col-md-12"><h4>Der er ingen produkter at vise</h4></div>
';
break;
}
echo '
<div class="col-sm-4 col-lg-4 col-md-4" style="min-height:425px;">
<div class="thumbnail">
<img src="'.mysql_result($result, $i, 'COL 25').'" alt="" style="max-height:300px;">
<div class="caption">
<h4 class="pull-right">'.mysql_result($result, $i, 'COL 20').' point</h4>
<h4 style="color:rgb(220,145,27)">'.mysql_result($result, $i, 'COL 2').'</h4>
<p>Vare nr.: '.mysql_result($result, $i, 'COL 14').'</p>
</div>
<div class="buy">
<form action="" method="POST" name="buy">
<!--- <select name="variant" class="form-control">
<option>small</option>
</select><br> -->
<button class="btn btn-m center-block" type="submit" style="color:white;background-color:rgb(220,145,27);">Køb</button>
</form>
</div>
</div>
</div>
';
};
?>