新浪sae在线php编辑怎么连接到sae的mysql上啊,这段代码哪里错了 15
$mysql=newSaeMysql();$sql="SELECT*FROM`user`LIMIT10";/*$sql="SELECT*FROM`11RTE`LIMIT0...
$mysql = new SaeMysql();
$sql = "SELECT * FROM `user` LIMIT 10";
/*$sql = "SELECT * FROM `11RTE` LIMIT 0, 30 ";
$mysql->runSql( $sql );
if( $mysql->errno() != 0 )
{
die( "Error:" . $mysql->errmsg() );
}*/
//
// $con = mysql_connect("SAE_MYSQL_HOST_M","SAE_MYSQL_USER","SAE_MYSQL_PASS");
// mysql_select_db("app_supermancty");
//$sql = "CREATE TABLE Persons (FirstName varchar(15), LastName varchar(15), Age int )";
//mysql_query($sql,$con);
$sql = "SELECT * FROM `11RTE` WHERE `title` = \'{$keyword}\' LIMIT 0, 30 ";
$data = $mysql->getData( $sql );
// $query=mysql_query($sql);
//$rs=mysql_fetch_array($result, MYSQL_ASSOC);;
$contentStr=$data['content'];
$imagUrl =$contentStr;
$webUrl =$contentStr;
//关闭
$mysql->closeDb();
$resultStr = sprintf($newsTpl,$fromUsername,$toUsername,$time, $imagUrl , $webUrl);
echo $resultStr; 展开
$sql = "SELECT * FROM `user` LIMIT 10";
/*$sql = "SELECT * FROM `11RTE` LIMIT 0, 30 ";
$mysql->runSql( $sql );
if( $mysql->errno() != 0 )
{
die( "Error:" . $mysql->errmsg() );
}*/
//
// $con = mysql_connect("SAE_MYSQL_HOST_M","SAE_MYSQL_USER","SAE_MYSQL_PASS");
// mysql_select_db("app_supermancty");
//$sql = "CREATE TABLE Persons (FirstName varchar(15), LastName varchar(15), Age int )";
//mysql_query($sql,$con);
$sql = "SELECT * FROM `11RTE` WHERE `title` = \'{$keyword}\' LIMIT 0, 30 ";
$data = $mysql->getData( $sql );
// $query=mysql_query($sql);
//$rs=mysql_fetch_array($result, MYSQL_ASSOC);;
$contentStr=$data['content'];
$imagUrl =$contentStr;
$webUrl =$contentStr;
//关闭
$mysql->closeDb();
$resultStr = sprintf($newsTpl,$fromUsername,$toUsername,$time, $imagUrl , $webUrl);
echo $resultStr; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询