I've got
MySQL_Connect(); $query = "Select * FROM test"; MySql_Query($query);
but nothing returns.
MySQL_Connect(); $query = "Select * FROM test"; MySql_Query($query);
|
|
|
$username = "myUser";
$password = "myPassword";
$server = "localhost";
// Connect to MySQL
mysql_connect($server,$username,$password)
or die ("Unable to connect to MySQL server.");
// Select the Database
$db = mysql_select_db("myDB")
or die ("Unable to select database");
// Run your query
$query = "SELECT * FROM test";
$results = mysql_query($query);
// Get your results
$myrow = mysql_fetch_row($results); // You can also use a while loop for multiple results