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

Updating to mysqli

Thread began 2/27/2019 3:31 pm by john70964 | Last modified 2/27/2019 7:56 pm by Ray Borduin | 30 views | 3 replies |

john70964

Updating to mysqli

Hello Ray,
I am trying to update a .php page to mysqli but am receiving a syntax error on line 93
I am attaching the page and wonder if you can see where I am going wrong?
Many thanks
John

Sign in to reply to this post

Ray BorduinWebAssist

It doesn't look like the code has been updated to mySQLi. It looks like just the connection was updated.... If you open the server behavior and re-apply it then the code should be updated to MySQLi. The entire chunk of code should be updated. This is MySQL standard code that just has the connection updated to MySQLi, so that is why it has an error.

Sign in to reply to this post

john70964

Thanks Ray
When you say "open the server behavior and re-apply it" I do not understand.
I have opened and closed the Recordsets and the MySqli Dynamic lists/Menu items but this seems to make no difference.

Sign in to reply to this post

Ray BorduinWebAssist

The issue is with the Insert Record server behavior. If you don't see it in the Server Behaviors panel, it might be because of hand edits preventing Dreamweaver from recognizing it. It looks like you may have removed a few line breaks... try updating lines 102-116 to:

GetSQLValueString($_POST['Description1'], "text"),
GetSQLValueString($_POST['ForSale'], "text"),
GetSQLValueString(isset($_POST['ContactPermission'])?"1":"0", "int"));

mysql_select_db($database_conn1_i, $conn1_i);
$Result1 = mysql_query($insertSQL, $conn1_i) or die(mysql_error());

$insertGoTo = "boat_insert_images.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
Sign in to reply to this post

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