I am a novice self-learning ~ to find easy to understand code.
If you're not busy, help me look at the code I wrote,
Page blank, write to the end I feel I am still in the face of the process, how to go back ~ ~ ~
Ask for advice ~ ~
Reply to discussion (solution)
In fact, when you do not write code, you can refer to someone else to write the idea of code, and then into their own things, to apply.
http://www.oschina.net/code/snippet_96541_3441
There's nothing wrong with what you wrote.
Constructor does not have database name parameter
Is it a change?
protected $_host;
protected $_root;
protected $_password;
Right
Is it okay to use ADODB directly?
constructor only 3 parameters without database name, no choice to the library, can not find out the data, this error is more obvious
Your Select method does not use MYSQL_FETCH_ASSOC or mysql_fetch_array to get the data, so there is no result.
It should be.
$result = mysql_query ("SELECT * from users"), $rows = Array () while ($row = Mysql_fetch_assoc ($result)) { $rows [] = $row ; } Print_r ($rows);