Hint: For improved responsiveness, use Internet Explorer
4 (or above) with Javascript enabled, choose 'Dynamic' from
the View dropdown and hit 'Set Options' to save your changes. |
Messages
1 to 10 of 41 (Total: 41) |
First |
Prev |
Next |
Last
|
Subject |
Author
|
Date |
 |
 |
|
MartinDocherty |
3:48 10 Apr 2020 |
 |
 |
|
Valter |
8:01 16 Jul 2018 |
 |
|
Gianluigi |
10:05 16 Jul 2018 |
 |
 |
|
Jim |
21:32 13 Jul 2018 |
 |
 |
|
Jim |
8:30 1 Jul 2018 |
 |
|
Gianluigi |
8:35 1 Jul 2018 |
 |
 |
|
Laurent |
4:13 25 May 2018 |
 |
Hi Gian Luigi, using your extension since a long time, I just bought "professionnal query" because I use now PHP/MySQL on a hosting with PHP7 and I needed to use the MySQLi PHP extension.
Seems to works in DW. I could create a MySQLi connection with a distant MySQL database, with an OK test. I could create a recordset and I could see all the entries of the recordset. This means that the connection is OK from My DW and the distant Database.
But when I put all the files on the server, I get this error : "Fatal error: Uncaught Error: Call to undefined function mysql_select_db() in /home/laudag/immobilier-dubourg/affichettes/affichette-A4-paysage.php:39 Stack trace: #0 {main} thrown in /home/laudag/immobilier-dubourg/affichettes/affichette-A4-paysage.php on line 39".
*Here is the connection script from the file Testaffichette.php (hostname was the server IP and an other test with localhost which worked from my DW and a distant evaluation server configuration) : <?php # FileName="Connection_php_mysql.htm" # Type="MYSQLi" # HTTP="true" $hostname_Testaffichette = "Xxxx"; $database_Testaffichette = "Xxxxxx"; $username_Testaffichette = "Xxxxx"; $password_Testaffichette = "Xxxxxx"; $Testaffichette = new mysqli($hostname_Testaffichette, $username_Testaffichette, $password_Testaffichette, ""); if ($Testaffichette->connect_errno) { echo "Failed to connect to MySQL: (" . $Testaffichette->connect_errno . ") " . $Testaffichette->connect_error; exit(); } ?>
* Here is the recordset script with the line 39 in bold (mysql_select_db($database_Testaffichette, $Testaffichette);), which seems to correspond at a a line with connection to the database : <?php require_once('Connections/Testaffichette.php'); ?> <?php 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"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } }
mysql_select_db($database_Testaffichette, $Testaffichette); $query_annonces = "SELECT * FROM id83_posts ORDER BY ID DESC"; $annonces = mysql_query($query_annonces, $Testaffichette) or die(mysql_error()); $row_annonces = mysql_fetch_assoc($annonces); $totalRows_annonces = mysql_num_rows($annonces); ?>
What could be the problem ? Is it a bug in your extension ou a problem of compatibility with my hosting (O2Switch) ? Thanks for answering
Laurent DAGANY (France)
|
|
|
|
|
 |
 |
|
JarrellHill |
8:01 4 May 2018 |
 |
|
Gianluigi |
9:49 4 May 2018 |
 |
|
JarrellHill |
12:21 4 May 2018 |
 |
Last Visit: Saturday 5 Apr, 2025 3:13 am |
First |
Prev |
Next |
Last
|
|
|
|