MySQL Forums
Forum List  »  PHP

Re: Select 2 table..
Posted by: Aydın Yakar
Date: December 16, 2005 02:01PM

Your code not work and how i can use your code for daily stats?;
-----------
$sql = mysql_query("SELECT uyeler.id AS user_id, COUNT(*) AS count FROM uyeler INNER JOIN sitestats ON uyeler.id=sitestats.sid ORDER BY count DESC");

while($veri = mysql_fetch_array($sql)) {
print_r($veri);
}


Error Output:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/aramaus/public_html/giris2.php on line 8

-----------------------------------------------------

That is working:
$sql = mysql_query("SELECT * FROM uyeler");
while($veri = mysql_fetch_array($sql) {
print_f($sql);
}

__________________________________________________________
http://PhpSetup.com | http://Arama.us

Options: ReplyQuote


Subject
Written By
Posted
December 16, 2005 09:55AM
December 16, 2005 12:02PM
Re: Select 2 table..
December 16, 2005 02:01PM
December 19, 2005 10:33AM
December 18, 2005 05:13AM
December 19, 2005 09:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.