EasyUI Forum

General Category => General Discussion => Topic started by: joe007 on July 26, 2020, 08:49:44 AM



Title: connection to database
Post by: joe007 on July 26, 2020, 08:49:44 AM
Hi,
I'm new on easyui..does anyone know how to connect the data grid with a table on database.

thx,

Joe


Title: Re: connection to database
Post by: stworthy on July 27, 2020, 12:21:37 AM
This tutorial shows how to create a database table and retrieves data using a php script.
Please look at this tutorial https://www.jeasyui.com/tutorial/app/crud.php


Title: Re: connection to database
Post by: joe007 on July 27, 2020, 02:27:57 AM
Hi,
Firstly thanks for the respon. I've read the script as below :

$rs = mysql_query('select * from users');
$result = array();
while($row = mysql_fetch_object($rs)){
    array_push($result, $row);
}
 
echo json_encode($result);

my next questions are :
1. Where are the database? it's only users table
2. I can not see the user, password, and db of those script

thx,

Joe