converting to mysqli
Hi Jason
How would I convert this code to a mysqli version please?
<?php
$chk_rows = mysql_num_rows($SpecialOffersPanel);
if ($chk_rows > 0) {
mysql_data_seek($SpecialOffersPanel, 0);
$row_SpecialOffersPanel = mysql_fetch_assoc($SpecialOffersPanel);
}
?>
<?php if ("".$showError ."" != "0") { ?>
<?php } ?>
and this one that i use with mod re-wrting
<?php
$colname_PageContentsPerm = "-1";
if (isset($_GET['perm'])) {
$colname_PageContentsPerm = $_GET['perm'];
}
$colname_PageContents = "-1";
if (isset($_GET['id'])) {
$colname_PageContents = $_GET['id'];
}
mysql_select_db($database_PowerCMSConnection, $PowerCMSConnection);
$query_PageContents = sprintf("SELECT * FROM services_plumbing WHERE ProductContentsID = %s OR Permalink = %s AND Live = 1", GetSQLValueString($colname_PageContents, "text"),GetSQLValueString($colname_PageContentsPerm, "text"));
$PageContents = mysql_query($query_PageContents, $PowerCMSConnection) or die(mysql_error());
$row_PageContents = mysql_fetch_assoc($PageContents);
$totalRows_PageContents = mysql_num_rows($PageContents);
?>
All its doing is checking to see if the contents of the table have been set to live (1) or not (0) and if 0 then nothing shows in the front end
Thanks
Jamie