SAEmySql cannot retrieve results. 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 ();
}
Reply to discussion (solution)
For PHP, go to a special version.
For PHP, go to a special version.
Oh, okay! I think it's database-related. I put it here first.
Let me check it out, friends! Come on!
Only mysql classes that inherit sae can use the defined constants
1. confirm that the mysql service is activated.
2. since the SaeMysql class is used, you should discard the mysql function family.
$sql = "SELECT * FROM 'myTable'";
Remove single quotes in 'mytable'
Only mysql classes that inherit sae can use the defined constants
You are right. The two cannot be mixed. now the problem has been solved. thank you!
1. confirm that the mysql service is activated.
2. since the SaeMysql class is used, you should discard the mysql function family.
1. confirm that the mysql service is activated.
2. since the SaeMysql class is used, you should discard the mysql function family.
Thanks for your help. now the problem has been solved, and you have not paid attention to the quotation marks before. I am a newbie. please take care of me more!