2013-02-13 119 views
-4

我沒有從這個查詢結果。難道我做錯了什麼?查詢沒有結果

 $query = mysql_query("SELECT user_url FROM tvb_users WHERE ID = '$currentAuthor->ID'") or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error()); 
     $query2 = $query['user_url']; 
     echo "$query2"; 

(WordPress的)

+0

您需要獲取結果集。 – datasage 2013-02-13 17:35:53

+1

$ row = mysql_fetch_array($ query);那麼$ user_url = $ row ['user_url']; – 2013-02-13 17:36:10

回答