Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
If this profile has created any
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 01/31/11 16:38 

Code
      // See if this profile has any already created
    $req = "SELECT COUNT(adCat_id) AS vcount
              FROM {$jamroom_db['ecmClassifiedCat']}
              WHERE ad_band_id = '{$_user['user_band_id']}'";

             $_rt = dbQuery($req,'SINGLE');
    if (checkType($_rt['vcount'],'number_nz'))


How do I change this code I tried alot of options here but these ae all admin created and there is nofield in the table for the user I can create one if necessary, but would prefer to not add the extra field if not needed. How can I add this so that itwould just show the option if availableandnot show the option if not available. I caneasily delete this line which isthe way ihave been doingit and it shows the modify/delete whether there are options or not. So I amjust looking at seeingi f this can be done ifnot no bigissue.
This is the admin_module.php under the cp directory.
Thanks James


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 01/31/11 19:18 
I'm not quite sure what you're trying to do? The code you have will get a count of the items in ecmClassifiedCat for a given band_id...

Kyle


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 01/31/11 19:41 

smith.kyle:
I'm not quite sure what you're trying to do? The code you have will get a count of the items in ecmClassifiedCat for a given band_id...

Kyle


Exactly so what i want to do is do the same thing without it having nothing to do with the particular band id if possible


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 01/31/11 19:49 
Get rid of the WHERE clause?


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 01/31/11 20:11 

smith.kyle:
Get rid of the WHERE clause?

This was the first thing I tried and it didnt work

I tried it the following two ways these were my first thoughts as well


Code
    $req = "SELECT COUNT(adCat_id) AS vcount
              FROM {$jamroom_db['ecmClassifiedCat']}


Code
    $req = "SELECT COUNT(adCat_id) AS vcount
              FROM {$jamroom_db['ecmClassifiedCat']};



_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 01/31/11 20:35 
Thanks Kyle I relooked over the code and realized i didnt have the "in place


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.