Laravel内でmysql_fetch_array()を使用しようとするとエラーが発生します。Laravelはmysql_fetch_array()を使用できません
while ($row = mysql_fetch_array($query))
代わりにmysql_fetch_array()を使用しますか?私が得た
エラー、
は、mysql_fetch_array()は、パラメータ1が
フル一部、
//prepare the tag cloud array for display
$terms = array(); // create empty array
$maximum = 0; // $maximum is the highest counter for a search term
$query = DB::select('SELECT term, counter FROM search ORDER BY counter DESC LIMIT 30');
while ($row = mysql_fetch_array($query))
{
$term = $row['term'];
$counter = $row['counter'];
// update $maximum if this term is more popular than the previous terms
if ($counter > $maximum) $maximum = $counter;
$terms[] = array('term' => $term, 'counter' => $counter);
}
完全なものを追加 –
なぜですか?なぜあなたはこれをやりますか?代わりに 'DB'関数を使用してください – aynber
ここでDB関数を使用するには? DB :: ?? – Nim