Hi guys. I'm having a bit of a problem with a "count" I'm doing.
$cond->bool('AND');
I've also tried it without bool()...
Basically, I need it to only;
Message.msg_username MUST EQUAL $USER->{user_username}
PMFoldersIDs.folder_id MUST EQUAL $folder_id (a number)
Can anyone give me a hand with this? I've tried the new structuring of;
'Field' => '=' => $value, 'Otherfield' => '=' => $value2
.. but that gives an incorrect count.
It seems to only be taking into account the "Message" table count, as its giving back 239, instead of 2 (which is what it should be).
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Code:
my $cond = GT::SQL::Condition->new('Message.msg_username','=',$USER->{user_username} =>, 'PMFoldersIDs.folder_id' => '=' => $folder_id); $cond->bool('AND');
I've also tried it without bool()...
Basically, I need it to only;
Message.msg_username MUST EQUAL $USER->{user_username}
PMFoldersIDs.folder_id MUST EQUAL $folder_id (a number)
Can anyone give me a hand with this? I've tried the new structuring of;
'Field' => '=' => $value, 'Otherfield' => '=' => $value2
.. but that gives an incorrect count.
It seems to only be taking into account the "Message" table count, as its giving back 239, instead of 2 (which is what it should be).
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

