andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


connecting to mysql using "useDB"

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> MadLibs
View previous topic :: View next topic  
Author Message
jesusjim
Newbie


Joined: 25 Jan 2006
Posts: 1
Location: pico rivera

PostPosted: Wed Jan 25, 2006 10:54 pm    Post subject: connecting to mysql using "useDB" Reply with quote

i wanted to connect to the mysql server but was not sure what i needed to put in all the fields.

"useDB" asked me for
username - got it
password - got it
madlibs - didn't get it
mydb - got it
localhost - got it

please help

thanks Exclamation
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Thu Jan 26, 2006 3:45 am    Post subject: Reply with quote

Hi, and welcome to the board!

The 'madlibs' string in the useDB method refers to the database table that contains the madlibs stories. I just default it to 'madlibs' because it seems sensible, though you could pass any table name to the method.

The structure of the table is this:

Code:
CREATE TABLE madlibs
(
   id      int(11)      NOT NULL auto_increment,
   title   varchar(255) NOT NULL default '',
   story   mediumtext   NOT NULL,
   PRIMARY KEY (id)
)


You could, of course, call it something other than 'madlibs', but whatever you do call it that's the string you must pass to useDB.

Regards,

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> MadLibs All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group