Query data return error warning in SAE
SAE platform, the database is open, the table has been built, want to implement the function: Query field A contains the record of content A, 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 result of the operation is:
Connect success
Warning:mysql_query () [Function.mysql-query]: This app isn't authorised in index.php on line 5
Warning:mysql_query () [function.mysql-query]: A link to the server could not being established in index.php on line 5
Warning:mysqli_query () [function.mysqli-query]: Empty query in saemysql.class.php on line 191
Is it wrong to ask the next members greatly?
------to solve the idea----------------------
$sql = "Select * from ' nature ' WHERE ' name ' like '% Wolf% ' LIMIT 0, 30";
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service