Show if conditional region syntax
I'm busy converting a site with a lot of coding generated by ADDT and other PHP/MySQL extensions over to MySQLi and thought I'd better check before I go any further that what I've got is correct, or if it will cause me problems further down the line.
The code I had was
<?php
// Show IF Conditional TopMenu
if (@$row_Rs_siteinfomnu['site_menu'] >= "2"
AND
@$row_Rs_siteinfomnu['site_menu'] <= "4") {
?>
so does that simply become
<?php
// Show IF Conditional TopMenu
if ($Rs_siteinfomnu->getColumnVal("site_menu") >= "2"
AND
$Rs_siteinfomnu->getColumnVal("site_menu") <= "4") {
?>
or do I need to do anything else?
I also have this one that I need to convert as well but not yet sure if I'm heading in the right direction!
<?php // Hide if RS Field is Null
$field = $row_Rs_dog['photo1_copyr'];
if(strlen($field) > 0){
?>
which I've got as far as changing to
<?php // Hide if RS Field is Null
$field = $Rs_dog->getColumnVal("photo1_copyr");
if(strlen($field) > 0){
?>
but really not sure if that's going to be the right way to do it or not.
Thanks.