Create Account
Sign In

please help: Personal Message System in php

To create and answer topics, you must to be logged.
Pages: 1
Author Message
Untner
12/04/2011 at 16:21:16
Untner
Member
new_pm.php
Code:
...
$dn1 = mysql_fetch_array(mysql_query('select count(id) as recip, id as recipid, (select count(*) from pm) as npm from users where username="'.$recip.'"'));
...

ERROR:
Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
The recipient does not exists.

please help

ybouane
12/04/2011 at 19:57:48
ybouane
Admin
Hi,
Try:
$dn1 = mysql_fetch_array(mysql_query('select count(id) as recip, id as recipid, (select count(*) from pm) as npm from users where username="'.$recip.'" group by id')); It should work.

Cordially :)

Image
Untner
14/04/2011 at 15:01:35
Untner
Member
thanks, it works

Pages: 1