MYSQL Connection

Hi
I am trying to get data out of MYSQL using the following

webix.ready(function(){
grida = webix.ui({
container:“testA”,
view:“datatable”,
columns:[
{ id:“name”, header:“name”, width:120 },
{ id:“location”, header:“location”, width:60 }
],
autoConfig:true,
autoheight:true,
autowidth:true,
url:“data.php”
});
});

data.php

<?php require_once("common/connector/data_connector.php"); $dbtype = "MySQL"; $conn = mysql_connect('localhost', "root","xxx"); // creates a connection mysql_select_db("DNAME"); // selects a database $data = new JSONDataConnector($conn, $dbtype); $data->render_table("resources","resource_id","name"); nothin is loading any ideas? many thanks

Try to load data.php directly in a browser. Does it show any JSON output?

If there is no a valid output, check server side logs, most probably you have a DB connection issue.

I tried the exact same thing as andyrav. I checked the server logs after opening my data.php file in a browser and saw that there was no entry in the general or error logs for MySQL. I don’t think the script even executed, or something would have shown.

If you are using modern version of PHP, the above code will not work as mysql_connect is deprecated ( you need to use PDO )