[英]How to access data from orientdb on a PHP Page?
I have installed OrientDb PHP Official driver from https://github.com/orientechnologies/PhpOrient . 我已经从https://github.com/orientechnologies/PhpOrient安装了OrientDb PHP Official驱动程序。
Now, In the PHP Page, I just want it to display only values of attributes of 'user' collection such as user_id, username, email_id,mobile etcusing the print_r() function. 现在,在PHP页面中,我只希望它使用print_r()函数仅显示“用户”集合的属性值,例如user_id,username,email_id,mobile等。
$client = new PhpOrient( 'localhost', 2424);
$client->username = 'root';
The code which displays the output are as follows :: 显示输出的代码如下:
$client->password = 'root';
$client->connect();
$ClusterMap = $client->dbOpen( 'krshop', 'root', 'root' );
$data = $client->query( 'select from user limit 10' );
echo "<pre>";print_r($data);
User collection data using php of orientdb 使用OrientDB的php收集用户数据
try this code: 试试这个代码:
$client = new OrientDB('localhost', 2424);
$client->connect('root', 'root');
$client->DBOpen('krshop', 'root', 'root');
$data = $client->select('select from user limit 10');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.