SAEmySql cannot retrieve results. ask for help! Let's take a look! I have created a table myTable on the SAE platform, & nbsp; now I want to get data from it, but I cannot get it at all. & nbsp; num outputs 0, running SQL statements on the platform can be retrieved. I don't know where my PHP statements are wrong or what operations do I need? Let me have a look! What should I do? I still can't do it for a long time. I'm dizzy! $ Link & nbsp SAE mySql cannot find the result. ask for help! Let's take a look!
I have created a table myTable on the SAE platform. now I want to obtain data from it, but I cannot get it at all. num outputs 0, running SQL statements on the platform can be retrieved. I don't know where my PHP statements are wrong or what operations do I need?
Let me have a look! What should I do? I still can't do it for a long time. I'm dizzy!
$ 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 ();
}
------ Solution --------------------
For PHP, go to a special version.
------ Solution --------------------
Only mysql classes that inherit sae can use the defined constants
------ Solution --------------------
1. confirm that the mysql service is activated.
2. since the SaeMysql class is used, you should discard the mysql function family.
------ Solution --------------------
$sql = "SELECT * FROM 'myTable'";
Remove single quotes in 'mytable'