Im getting this error on my site: Database error. [01/05/2010 19:21:40] MySQL: Invalid Query: SELECT count(FriendID) from ava_friends where UserID =1 SQL error: 0 () Code (markup): The Php Code is like this: <?php $friendsql = "SELECT count(FriendID) from ava_friends where UserID =".$profile['id']; $DB->query($friendsql); list($FriendCount) = $DB->next_record(); ?> PHP: Can somebody help me...?
Try: <?php $friendsql = "SELECT 'count(FriendID)' from ava_friends where UserID =".$profile['id']; $DB->query($friendsql); list($FriendCount) = $DB->next_record(); ?> PHP: Untested, let me know.
Now Im getting this error, Database error. [03/05/2010 10:23:32] MySQL: Invalid Query: SELECT 'count(FriendID)' from ava_friends where UserID =1 SQL error: 0 () PHP: