I created a table on the SAE platform MyTable, and now I want to get the data from it, but I can't get it, num output is 0, run SQL statements on the platform can be retrieved, do not know where I write the PHP statement is wrong, or what else to do?
God help me see it! What should I write? Do a half-day or not, I want to faint ah!
$link = mysql_connect (sae_mysql_host_m. ':' . Sae_mysql_port, Sae_mysql_user, Sae_mysql_pass);
mysql_select_db (sae_mysql_db, $link);
if ($link)
{
$mysql = new Saemysql ();
$sql = "SELECT * from ' myTable '";
$num = 0;
while ($data = $mysql->getdata ($sql))
{
+ + $num;
}
$numLine = count ($data);
$mysql->closedb ();
}
Reply to discussion (solution)
Please go to the special edition of PHP to ask.
Please go to the special edition of PHP to ask.
Oh, all right! I think it's related to the database, and I put it here first.
Friends, help me see it! Big God, come on!
The MySQL class that inherits the SAE can use those defined constants
1. Confirm that the MySQL service is activated
2, since the use of Saemysql class, it is time to abandon the MySQL function family
$sql = "SELECT * from ' myTable '";
Remove single quotes from ' MyTable '
The MySQL class that inherits the SAE can use those defined constants
You're right, two can't mix, now the problem has been solved, thank you!
1. Confirm that the MySQL service is activated
2, since the use of Saemysql class, it is time to abandon the MySQL function family
1. Confirm that the MySQL service is activated
2, since the use of Saemysql class, it is time to abandon the MySQL function family
Thanks for helping, now the problem has been solved, the quotation marks have not been noticed before. I am a novice, but also ask you to take more care!