日期:2014-05-16 浏览次数:20632 次
<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$.post("http://hys2013.sinaapp.com/SQL.php",function(data){ alert("Data Loaded: " + data); });
</script>
</head>
<body>
</body>
</html>
<?
$mysql = new SaeMysql();
$conn = mysql_connect(SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS);
//if($conn){ $action="连接成功"; echo "document.write('".$action."');n"; }
$sql="SELECT * FROM `temp` WHERE id = ( SELECT MAX( CAST( id AS UNSIGNED ) ) FROM temp )";//获取最大ID的那一行
$row=$mysql->getLine($sql);
foreach ($row as $key=>$value)
{
$insert_id=$value;
break;//目前只需要id所以无需遍历所有值
}
echo $insert_id;
?>