json için mysql tablo

0 Cevap php

Ben önermek jQuery UI Auto tarafından kullanılabilecek bir json çıktı gerekir form.so Ben bir arama için yo kullanımı jQuery UI AutoSuggest planlıyorum.

heres veritabanı alt text

tablo adı recent_tags

I have tried this first connected to db

$do = mysql_query("SELECT * FROM recent_tags where query like '%" . $_GET['qery'] . "%'"); 
while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)) {
  $row_array['query'] = $row['query'];
        array_push($return_arr,$row_array);
    }
echo json_encode($return_arr);

but It's not working.. please guide me..

EDIT:

hatası alıyorum

Warning: array_push() [function.array-push]: First argument should be an array in /pathto/my/file.php

Teşekkürler

0 Cevap