0
我需要從查詢結果資源中讀取兩次數據。我嘗試過使用下面的查詢,但它不起作用。mysql_data_seek不能正常工作drupal7 API
$result = db_query("SELECT * FROM test");
echo '<pre>';
print_r($result->fetchAssoc());
mysql_data_seek($result, 0);
print_r($result->fetchAssoc());
只是我試圖通過$ result-一次迭代結果> fetchAssoc()函數,我想再次重複,從第一行記錄,所以我用mysql_data_seek,但它不工作
如何使用mysql_data_seek
在drupal7中?