close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

I have to migrate code originally built using your tools in PHP v.5.0 to v.7.1.

Thread began 3/06/2017 11:43 pm by lr_leal239405 | Last modified 3/08/2017 1:11 pm by lr_leal239405 | 80 views | 3 replies

lr_leal239405

I have to migrate code originally built using your tools in PHP v.5.0 to v.7.1.

I was able to to establish connection as such -

Connection file:

ORIGINAL IN V.5
$hostname_exhibitions_cx = "00.00.00.000";
$database_exhibitions_cx = "my-database-name";
$username_exhibitions_cx = "GGGGGGG";
$password_exhibitions_cx = "GGGGGGG";
$exhibitions_cx = mysql_pconnect($hostname_exhibitions_cx, $username_exhibitions_cx, $password_exhibitions_cx) or trigger_error(mysql_error(),E_USER_ERROR);

I CHANGED TO V.7
$hostname_exhibitions_cx = "00.00.00.000";
$database_exhibitions_cx = "my-database-name";
$username_exhibitions_cx = "GGGGGGG";
$password_exhibitions_cx = "GGGGGGG";
$exhibitions_cx = new mysqli('hostname_exhibitions_cx', 'username_exhibitions_cx', 'password_exhibitions_cx!', 'database_exhibitions_cx'); ?>

BUT IS CODE BELOW CORRECT ON V.7? I CANT' GET THE DATA TO SHOW

CODE

ORIGINAL IN V.5 IN THE DATA FILE

mysql_select_db($database_exhibitions_cx, $exhibitions_cx);
$query_Recordset1 = "SELECT * FROM sangiacomoexhibitions_tbl WHERE RemovalDate > NOW() ORDER BY RemovalDate ASC";
$Recordset1 = mysql_query($query_Recordset1, $exhibitions_cx) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);


I CHANGED TO V7

$exhibitions_cx->select_db(database_exhibitions_cx, $exhibitions_cx);
$query_Recordset1 = $exhibitions_cx->query("SELECT * FROM sangiacomoexhibitions_tbl WHERE RemovalDate > NOW() ORDER BY RemovalDate ASC");
$Recordset1 = mysqli_query($query_Recordset1, $exhibitions_cx);
$row_Recordset1 = mysqli_fetch_row($Recordset1);
$totalRows_Recordset1 = mysqli_num_rows($Recordset1)




HERE'S DATA THAT SHOULD BE DISPLAYED: WHAT NEEDS CHANGING FOR THIS? ALL I GET ON THE PAGE IS THE STATEMENT ""Updating. Please check back later".


<?php

$date = date('Y/m/d');
$mydate = date("Y/m/d",strtotime($row_Recordset1['RemovalDate']));

$Recordset1_endRow = 0;
$Recordset1_columns = 3; // number of columns
$Recordset1_hloopRow1 = 0; // first row flag
do {
if($Recordset1_endRow == 0 && $Recordset1_hloopRow1++ != 0) echo "<tr>";
?>
<?php

if ($mydate < $date) {

echo "Updating. Please check back later";
} else {
do {
echo "<div class='exhibitionswrap'>";
echo "<div class='exhibitions'>";
echo '<p>';
$image = '<img src="images/exhibitions/' . $row_Recordset1['Logoimg'] . '">';
echo "<a target='_new' href=" . "http://" . $row_Recordset1["Website"] . ">" ;
echo "" .$image."";
echo "</a>";
echo '</p>';
echo '<p>';
echo $row_Recordset1["Eventdate"];
echo '<br>';
echo $row_Recordset1["Location"];
echo '</br>';
echo "<a target='_new' href=" . "http://" . $row_Recordset1["Website"] . ">" ;
echo $row_Recordset1["Website"];
echo "</a>";
echo '<br>';
echo '<br>';
echo "</div>";
echo "</div>";

} while ($row_Recordset1 = mysqli_fetch_assoc($Recordset1));
}
?>
<?php $Recordset1_endRow++;
if($Recordset1_endRow >= $Recordset1_columns) {
?>

<?php
$Recordset1_endRow = 0;
}
} while ($row_Recordset1 = mysqli_fetch_row($Recordset1));
if($Recordset1_endRow != 0) {
while ($Recordset1_endRow < $Recordset1_columns) {
echo("");
$Recordset1_endRow++;
}
}
?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...