PHP Arada MySQL sorgu hata

1 Cevap php

I have a php file that has to be loaded as a web page. This page is 17Kb in size. It has a php mysql query script inside.

the problem now, sometimes my mysql_query() lines gives an error. When being refreshed, it works again. It just have an error sometimes on that same line. I check the query string and it was okay, for if that was the problem the error should happen all the time.

Herhangi bir fikir? ...

I was thinking maybe it was the file that has not been loaded completely. And if that so, anyone to help me?... thanks.

1 Cevap

"Warning: mysql_fetch_array (): Verilen argümanı geçerli bir MySQL sonuç kaynak değildir."

Eğer mysql bağlantısı ile ilgili bir sorun var gibi geliyor. Eğer bağlantı fonksiyonu olarak adlandırılır sonra hata mesajı yazdırmak çalıştığınızda, aşağıdaki kodu deneyin.

$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}