2013-10-22 95 views
-1

我想更新數據庫skadate_profile一行與此代碼MySQL的更新查詢 -

if (!isset($_COOKIE["lastlogin"])) 
{ 
setcookie("lastlogin", $current_cookie, mktime(23, 59, 59, date("m"), date("d"), date("y")) , "/", "", 0); 
$result8 = mysql_query("UPDATE skadate_profile SET time_left = 600, cookie = '".$current_cookie."',todays_date = '".$todays_date."' where profile_id = '".mysql_real_escape_string($avconfig['siteId'])."' limit 1"); 
$cook = $_COOKIE["lastlogin"]; //users PC cookie 
//echo "RESULT ", $result8; 
    //echo "Here setting cookie to ", $cook; 
     } else { 
    //echo "Cookie was prev set and is ", $cook; 
} 

$ result8給出值1

有人能幫助我嗎?

+0

爲什麼它應該給出與1不同的東西? –

+0

問題是什麼?數據庫沒有更新指定的表嗎? – elimirks

+0

'$ result8給出1的值是什麼意思?如果你的意思是它只給你一個結果,那是因爲'limit 1' –

回答