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

How do I upgrade older Data Assist pages from MySQL to MySQLi? I get the following error message on all my pages that use the MySQL database connection. Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the futur

Thread began 9/26/2019 11:00 am by erinlima318673 | Last modified 9/26/2019 1:41 pm by erinlima318673 | 553 views | 3 replies


Originally Said By: Ray Borduin
  You can simply turn off that Depricated message and ignore it for now. You would only be forced to update your code when you go to a php7 server... this is just a warning.

To upgrade you just have to install DataBridge 2 and then open any Recordsets, Insert, Update, and Delete Server behaviors on the page and switch them to the MySQLi connection. Once you click OK with a MySQLi connection, then the code is updated to MySQLi.  

I did this, and it does update my DB connection to MySQLi, however every page that uses that connection now throws up the following errors causing my pages to not display at all:

Warning: mysql_select_db() expects parameter 2 to be resource, object given in /home/content/29/8748029/html/index.php on line 39

Warning: mysql_query() expects parameter 2 to be resource, object given in /home/content/29/8748029/html/index.php on line 41

those lines are part of the following function on the pages:

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
return $theValue;

}mysql_select_db($database_conn_inventory, $conn_inventory);
$query_WADAusedbikes = "SELECT * FROM usedbikes WHERE new_or_used = 'Used' AND usedbikes.Status = 'In Inventory' ORDER BY ModelYear DESC, Importance DESC LIMIT 12";
$WADAusedbikes = mysql_query($query_WADAusedbikes, $conn_inventory) or die(mysql_error());
$row_WADAusedbikes = mysql_fetch_assoc($WADAusedbikes);
$totalRows_WADAusedbikes = mysql_num_rows($WADAusedbikes);

Line 39 refers to: }mysql_select_db($database_conn_inventory, $conn_inventory);
Line 41refers to: $WADAusedbikes = mysql_query($query_WADAusedbikes, $conn_inventory) or die(mysql_error());

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





Ease of use


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