close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Converting search pages from MySQL to MySQLi

Thread began 4/03/2019 2:36 pm by EmmaMorris | Last modified 4/15/2019 12:27 pm by Ray Borduin | 115 views | 23 replies |

EmmaMorris

Converting search pages from MySQL to MySQLi

I purchased the new Data Bridge as we spoke about. I believe the only pages I need to convert are the search_i.php, the results_i.php and the choice page (in this case, showdr_i.php.

1. I have converted the search_i.php page and it seems to work correctly. Until the others are done I wont know for sure 100%. No error messages. Attaching the converted page.

Reminder FYI: You created a custom wada_search page for me back when I first did this page. Will attach.

2. The results page seems to come up with the correct results to choose from but comes up with the deprecated message up top pointing to the wada_search. I attempted to convert this page but had issues, I assume due to the arrays or the custom code. Attached is a fresh copy of this page before mods.(MySQL code)

3. Showdr_i.php page. When I make a selection to view on the results page, this page will not show but has this error message up top:

"Fatal error: Can't use method return value in write context in /mydirectory/showdr_i.php on line 16"

I did the conversions for this page but not sure what to do with this line (16) and possibly (10-12).

If you could, let me know where to go from here.

Thanks so much.
Emma.

Sign in to reply to this post

Ray BorduinWebAssist

Showdr_i.php line 16 should be:

if (!$rsMain->getColumnVal('specialtiesID')) $rsMain->Results[0]['specialtiesID'] = 0;

The other lines should be fine on that page.

The search results page needs to be converted, both the recordset and the search, and since it uses custom code, some will have to be done manually.

I can't do that without FTP access. If you can send me FTP information for the site and a URL so I can browse the page for testing then I can update it for you.

Sign in to reply to this post

EmmaMorris

I modified line 16 as well as line 24 as it was similar.

There are 3 sections that have mysql code still... Near lines 127, 154 and 170 that are definitely problems.
I tried manually converting manually but am having an issue.. guidance

Sign in to reply to this post

Ray BorduinWebAssist

I'll take a look at all of the remaining issues once I have a url to view them and FTP access.

Sign in to reply to this post

EmmaMorris

I have fixed the problems on the showdr_i.php page.
So, at this point, as far as I know the only thing I need to address is the results_i.php page.
Because of the custom programming I did not want to try it.
Ftp info sent privately.
Emma

Sign in to reply to this post

Ray BorduinWebAssist

The results page has been updated to use MySQLi. Please also download the rsobj.php file used on the page.

Sign in to reply to this post

EmmaMorris

Thanks Ray..
I have a few other things to check and pages to convert but they should be simple.
I so appreciate your help

Emma

Sign in to reply to this post

EmmaMorris

Only problem I have found so far.

Sign in to reply to this post

Ray BorduinWebAssist

Instead of:
<?php echo($rsMain->getColumnVal("notes")); ?>

use:
<?php echo($rsMain->getColumnVal("notes",false)); ?>

The mySQLi code has automatic HTML Cross Site Scripting Injection protection, that needs to be disabled when you want to allow it to display html.

Sign in to reply to this post

EmmaMorris

Great. That worked just fine. I have fixed several other little things on a couple of the pages.

One issue on the search_i.php page at the bottom Notes: just type in anything
The error points to the results_i page.

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