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
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
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
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!