hi all,
i’m walking my first steps with dhtmlx and try to rebuild the “Your First App” (docs.dhtmlx.com/tutorials__firs … index.html).
I have XAMPP running on a Win7 maschine.
in Step 6 i’m supposed to connect to a mysql DB.
This is my contact.php
<?php
require("../codebase/connector/grid_connector.php");//adds the connector engine
$res=mysql_connect("localhost","root","");//connects to server with db
mysql_select_db("mysql");//connects to db with name "dhtmlx_tutorial"
$conn = new GridConnector($res); //initializes the connector object
$conn->render_table("db","host","user,db"); //loads data //the method takes: the table's name, the id field, a list of fields to load
?>
and i’m receiving the following error:
googling gave me the suggestions, to exchange all mysql_* methods with mysqli_* methods, which carried the error a bit further:
[Wed Feb 21 11:02:22.359466 2018] [php7:warn] [pid 9264:tid 1620] [client ::1:57231] PHP Warning: Declaration of GridConnector::fill_collections($list) should be compatible with Connector::fill_collections() in C:\\xampp\\htdocs\\contact_manager\\codebase\\connector\\grid_connector.php on line 126, referer: http://localhost/contact_manager/
[Wed Feb 21 11:02:22.384466 2018] [php7:warn] [pid 9264:tid 1620] [client ::1:57231] PHP Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in C:\\xampp\\htdocs\\contact_manager\\data\\contacts.php on line 5, referer: http://localhost/contact_manager/
[Wed Feb 21 11:02:22.385466 2018] [php7:error] [pid 9264:tid 1620] [client ::1:57231] PHP Fatal error: Uncaught Error: Call to undefined function mysql_query() in C:\\xampp\\htdocs\\contact_manager\\codebase\\connector\\db_common.php:964\nStack trace:\n#0 C:\\xampp\\htdocs\\contact_manager\\codebase\\connector\\db_common.php(650): MySQLDBDataWrapper->query('SELECT `host`,`...')\n#1 C:\\xampp\\htdocs\\contact_manager\\codebase\\connector\\base_connector.php(513): DBDataWrapper->select(Object(DataRequestConfig))\n#2 C:\\xampp\\htdocs\\contact_manager\\codebase\\connector\\base_connector.php(496): Connector->get_resource()\n#3 C:\\xampp\\htdocs\\contact_manager\\codebase\\connector\\base_connector.php(398): Connector->render()\n#4 C:\\xampp\\htdocs\\contact_manager\\data\\contacts.php(8): Connector->render_table('db', 'host', 'user,db')\n#5 {main}\n thrown in C:\\xampp\\htdocs\\contact_manager\\codebase\\connector\\db_common.php on line 964, referer: http://localhost/contact_manager/
[Wed Feb 21 11:02:50.996363 2018] [php7:warn] [pid 9264:tid 1616] [client ::1:57291] PHP Warning: Declaration of GridConnector::fill_collections($list) should be compatible with Connector::fill_collections() in C:\\xampp\\htdocs\\contact_manager\\codebase\\connector\\grid_connector.php on line 126, referer: http://localhost/contact_manager/
do you have any idea?
I couldn’t find anything in the search facilities.
Thanks and Cheers,
K.