Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
Inserting Into the modules table
jamesd116



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

Posted: 06/21/09 07:04 
IF I had some data I Wanted to insert into the table when I run the integreity script how would this be acheived. I have tried touse the INSERT INTO butit did not work is their a special way to do it in the module.
Thanks


_________________
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
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 06/21/09 08:48 

jamesd116:
IF I had some data I Wanted to insert into the table when I run the integreity script how would this be acheived. I have tried touse the INSERT INTO butit did not work is their a special way to do it in the module.
Thanks


No.. you just would add a check in your schema.php file to test if the field already exists - if it does not (or doesn't contain the data you want), then you do an INSERT. Check out the main jamroom/include/jamroom-schema.inc.php file - it has dozens of examples of this.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
jamesd116



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

Posted: 06/21/09 09:27 
will give this a try thanks


_________________
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: 06/21/09 09:51 
I have pulled this from youe schema.inc.php file

Code
   }
        // Member Quota
        $req = "INSERT INTO {$jamroom_db['quota']}
                (quota_id, quota_time, quota_name, quota_disk, quota_max, quota_rank, quota_spot, quota_search, quota_radio,
                 quota_stats, quota_deep, quota_option1, quota_option2, quota_option3, quota_option4,
                 quota_themes, quota_cushion, quota_note )
                VALUES
                (-1,'". time() ."','Member Quota',5,0,'yes','no','yes','yes','yes','no','0','0','0','0','0','1',
                 'this is a sample admin note - you can use this field for notes that relate to this Jamroom Quota')";
        $cnt = dbQuery($req,'COUNT');
        if (!isset($cnt) || $cnt != 1) {
            jmLogger(0,'CRI',"dbVerifyDatabase() unable to create initial Jamroom Member Quota - verify database connectivity");
        }


Is this enough of information pulled or should I have more or less of this. I am in the process of changing the information over to my own as far as the data goes but im not sure about the stuff below the values


_________________
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.