An error is returned when data is queried in SAE. an error is returned. The SAE platform is enabled. The table has been created. to implement this function, query the record where field A contains content a and return the field B value of the record:
The code is as follows:
$ Mysql = new SaeMysql ();
Echo "Connect success
\ N ";
$ SQL = mysql_query ("SELECT * FROM 'Nature 'WHERE 'name' LIKE \ 'Wolf \' LIMIT 0, 30 ");
$ Data = $ mysql-> getData ($ SQL );
Echo $ data ['class'];
?>
The running result is:
Connect success
Warning: mysql_query () [function. mysql-query]: this app is not authorised in index. php on line 5
Warning: mysql_query () [function. mysql-query]: A link to the server cocould not be established in index. php on line 5
Warning: mysqli_query () [function. mysqli-query]: Empty query in saemysql. class. php on line 191
Where is the error?
Reply to discussion (solution)
$ SQL = mysql_query ("SELECT * FROM 'Nature 'WHERE 'name' LIKE 'wollong' LIMIT 0, 30 ");
$ SQL = mysql_query ("SELECT * FROM 'Nature 'WHERE 'name' LIKE' % Wolf % 'LIMIT 0, 30 ");
The moderator tried the two codes that you provided, and both of them gave the same warning...
Isn't saesql defining the mysql_query function?
I don't understand why...
Eye-catching
If you use the SaeMysql class, how can you use mysql functions?
$ Mysql-> getData ($ SQL)
$ SQL is an SQL command string
$ SQL = "SELECT * FROM 'Nature 'Where 'name' LIKE '% Wolf % 'limit 0, 30 ";
Thank you very much for the moderator. under your guidance, you have implemented the functions I want!