close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Using the MySQLi extension to update older sites

Thread began 5/27/2016 4:27 pm by iain331081 | Last modified 10/23/2017 1:37 pm by Ray Borduin | 744 views | 14 replies |

iain331081

Using the MySQLi extension to update older sites

I would like to have a look at updating some older sites that don't use mySQLi to mySQLi - is this something the extension can be used for, or is it a case of redoing a page (or at least all the database stuff) from scratch?

Sign in to reply to this post

iain331081

I have the extension so have been having a look at changing a page to use mySQLi.

I have gotten as far as creating the mySQLi connection, and also added a couple of record sets to a page.

The page is reporting that the recordset is empty even though it should have some records, and displays records in phpMyAdmin. So I'm not really sure how to check it should have records, or how to echo them - I have tried adding a mySQLi recordset, but something isn't right.

The page is here:

http://www.goodsafariguide.com/botswana/indexi.php

Sign in to reply to this post

Ray BorduinWebAssist

It is probably an issue with how you are testing the recordset. The page you have attached must be an older version since it doesn't have the empty message on it at all. Please attach the same version that is live and I can take a look.

Sign in to reply to this post

iain331081

Thanks Ray - I had played around a bit more - I have attached a copy of the current page now.

Sign in to reply to this post

Ray BorduinWebAssist

I still don't see a reference to the message "There are currently no Featured Safari Properties in" in the file. Where is that coming from? I'm trying to see why it is appearing, but this file doesn't seem to have it. Can I get FTP access to the server? That will make it easier for me to debug what is going wrong.

Sign in to reply to this post

iain331081

Sorry Ray - I had taken that out when i was trying a basic test recordset.

The current version has that added again, and also a test repeat region for rsTest.

Sign in to reply to this post

Ray BorduinWebAssist

You are using some standard MySQL server behaviors and bindings. You need to use the MySQLi "show if empty" and you need to use the bindings from the MySQLi recordset.

For instance you have: <?php echo($row_rsTest['Lodge']); ?>

It should be: <?php echo($rsTest->getColumnVal("Lodge")); ?>

Sign in to reply to this post

iain331081

Thanks Ray - are you able to get it to display anything?

I added:

<?php echo($rsTest->getColumnVal("Lodge")); ?>

But its not displaying anything.

Sign in to reply to this post

Ray BorduinWebAssist

Please attach a current version of the page you are working on with replies so I can check the syntax.

Sign in to reply to this post

iain331081

Hi Ray - just had another look, and realised I had all the bits right, just not all in the place they needed to be - have fixed that, and it all looks good now.

I think for a long time I didn't really get that the mySQLi extension pretty much does all the main DataBridge functionality - i.e. insert / update / delete records - just doesn't create the pages.

These pages are pretty straightforward to get familiar with redoing them in mySQLi.

One thing - as I was updating an old page, in the attached file, does it still need the code in lines 3-34, or does the rsobj.php file replace that?

Sign in to reply to this post
loading

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...