Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Script not creating tables

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Script not creating tables

Postby tww » Fri May 09, 2003 6:29 am

I purchased a script using one of the popular services. I loaded the files, but the sql file does not create the tables in the database. I've notified the programmer, but he doesn't seem to know how to fix the problem. I was hoping someone here could give me a hand. He indicated that I needed to execute the 'sql' file, but when I asked what he meant by this I didn't get a response. The phpAdmin and mySQL that I am using are already set up on the server by the hosti provider. I included the sql file below. I would appreciate any assistance or suggestions. Thank You.

-- Start Edit here

use melrosealumni_com;

-- Edit Ends here

-- User Data
DROP TABLE IF EXISTS `mem_members`;
CREATE TABLE mem_members (
iduser INT NOT NULL AUTO_INCREMENT,
activeflag BIGINT NOT NULL DEFAULT 0,
userid VARCHAR(15) NOT NULL DEFAULT '',
pswrd VARCHAR(15) NOT NULL DEFAULT '',
fname VARCHAR(25) NOT NULL DEFAULT '',
lname VARCHAR(25) NOT NULL DEFAULT '',
mname VARCHAR(25) NOT NULL DEFAULT '',
year VARCHAR(4) NOT NULL DEFAULT '',
address1 VARCHAR(25) NOT NULL DEFAULT '',
address2 VARCHAR(25) NOT NULL DEFAULT '',
city VARCHAR(25) NOT NULL DEFAULT '',
state VARCHAR(25) NOT NULL DEFAULT '',
zip VARCHAR(25) NOT NULL DEFAULT '',
country VARCHAR(25) NOT NULL DEFAULT '',
hphone VARCHAR(25) NOT NULL DEFAULT '',
wphone VARCHAR(25) NOT NULL DEFAULT '',
email VARCHAR(100) NOT NULL DEFAULT '',
web VARCHAR(100) NOT NULL DEFAULT '',
category VARCHAR(25) NOT NULL DEFAULT '',
usertype BIGINT NOT NULL DEFAULT 0,
activedate date NOT NULL DEFAULT '0000-00-00',
PRIMARY KEY(iduser)
);

INSERT INTO mem_members VALUES ( '', '1', 'admin ', 'admin', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1',curdate());

-- Common
DROP TABLE IF EXISTS `mem_common`;
CREATE TABLE mem_common (
id INT NOT NULL AUTO_INCREMENT,
agreement TEXT NOT NULL DEFAULT '',
paymentcode VARCHAR(10) NOT NULL DEFAULT '',
PRIMARY KEY(id)
);

INSERT INTO mem_common VALUES('','Dummy Text Dummy Text.. Registration Data. In consideration for the Service, you agree to provide we, complete, and accurate registration information (the "Registration Data") as prompted to do by the Service and to maintain and update this information as required to keep it current, complete and accurate. You understand our Service is advertising supported and you grant us the right to disclose the aggregate Registration Data to third parties in connection with marketing the Services. Furthermore, we may itself use your individual Registration Data to provide targeting of advertisements and other Service offers.
','100');
DROP TABLE IF EXISTS `mem_protectpage`;
CREATE TABLE mem_protectpage (
pageid INT NOT NULL AUTO_INCREMENT,
protected BIGINT NOT NULL DEFAULT 0,
Description VARCHAR(100) NOT NULL DEFAULT '',
filename VARCHAR(100) NOT NULL DEFAULT '',
imagefile varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY(pageid)
);

DROP TABLE IF EXISTS `mem_fields`;
CREATE TABLE mem_fields (
fid INT NOT NULL AUTO_INCREMENT,
fname VARCHAR(15) NOT NULL DEFAULT '',
ftype VARCHAR(15) NOT NULL DEFAULT '',
fdefvalue TEXT NOT NULL DEFAULT '',
fwidth INT NOT NULL DEFAULT 0,
fmaxsize INT NOT NULL DEFAULT 0,
factive BIGINT NOT NULL DEFAULT 0,
frequire BIGINT NOT NULL DEFAULT 0,
flabel VARCHAR(100) NOT NULL DEFAULT '',
ffixed BIGINT NOT NULL DEFAULT 0,
fpos INT NOT NULL DEFAULT 0,
PRIMARY KEY(fid));

INSERT INTO mem_fields VALUES('','userid','TEXT','',25,15,1,1,"User ID",1,1);
INSERT INTO mem_fields VALUES('','pswrd', 'TEXT','',25,15,1,1,"Password",1,2);
INSERT INTO mem_fields VALUES('','fname','TEXT','',25,25,1,0,"First Name",1,3);
INSERT INTO mem_fields VALUES('','lname','TEXT','',25,25,1,0,"Last Name",1,4);
INSERT INTO mem_fields VALUES('','mname','TEXT','',25,25,1,0,"Maiden Name",0,5);
INSERT INTO mem_fields VALUES('','year','TEXT','',15,4,1,0,"Year of Graduation (4 digits)",0,6);
INSERT INTO mem_fields VALUES('','address1','TEXT','',25,25,1,0,"Address Line 1",0,7);
INSERT INTO mem_fields VALUES('','address2','TEXT','',25,25,1,0,"Address Line 2",0,8);
INSERT INTO mem_fields VALUES('','city','TEXT','',25,25,1,0,"City",0,9);
INSERT INTO mem_fields VALUES('','state','TEXT','',25,25,1,0,"State",0,10);
INSERT INTO mem_fields VALUES('','zip','TEXT','',25,25,1,0,"Zip",0,11);
INSERT INTO mem_fields VALUES('','country','TEXT','',25,25,1,0,"Country",0,12);
INSERT INTO mem_fields VALUES('','hphone','TEXT','',25,25,1,0,"Home Phone",0,13);
INSERT INTO mem_fields VALUES('','wphone','TEXT','',25,25,1,0,"Work Phone",0,14);
INSERT INTO mem_fields VALUES('','email','TEXT','',25,100,1,1,"E-mail",1,15);
INSERT INTO mem_fields VALUES('','web','TEXT','',25,100,1,0,"Web Address",0,16);
INSERT INTO mem_fields VALUES('','category','TEXT','',25,100,1,0,"Web Address",0,17);

-- Access

DROP TABLE IF EXISTS `mem_access`;
CREATE TABLE mem_access (
fuid int NOT NULL auto_increment,
iduser int NOT NULL default 0,
featureid int NOT NULL default 0,
PRIMARY KEY (fuid));


DROP TABLE IF EXISTS `mem_features`;
CREATE TABLE mem_features (
featureid int(11) NOT NULL auto_increment,
feature varchar(200) NOT NULL ,
filename varchar(100) NOT NULL ,
PRIMARY KEY (featureid));

insert into mem_features ( featureid, feature, filename ) values ( NULL, 'Manage members', 'listmembers.php' );
insert into mem_features ( featureid, feature, filename ) values ( NULL, 'Manage Administrator', 'listadmin.php' );
insert into mem_features ( featureid, feature, filename ) values ( NULL, 'Mass mailer', 'massmailer.php' );
insert into mem_features ( featureid, feature, filename ) values ( NULL, 'View accounts not yet activated', 'listnotactive.php' );
insert into mem_features ( featureid, feature, filename ) values ( NULL, 'Edit administration login details', 'admindetail.php' );
insert into mem_features ( featureid, feature, filename ) values ( NULL, 'Add the code to the payment', 'paymentcode.php' );
insert into mem_features ( featureid, feature, filename ) values ( NULL, 'Make active / inactive protected pages', 'listpages.php' );
insert into mem_features ( featureid, feature, filename ) values ( NULL, 'Add the agreement text', 'editagreement.php' );
insert into mem_features ( featureid, feature, filename ) values ( NULL, 'Manage fields on the signup forms', 'listfields.php' );
tww
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri May 09, 2003 6:12 am

Postby Skeletor » Fri May 09, 2003 6:52 am

The file you provided doesn't do anything by itself. It contains many SQL statements that you will have to execute. One thing you could try is going into your phpadmin, and if it is like mine, you will have a tab labeled "SQL". From here you can execute SQL statements on your selected database. If you do not have a "SQL" tab, there should be somewhere in the phpadmin program to execute individual SQL statements.

I would then just to through the SQL statements in the file and execute each one individually. That's what it looks like you need to do anyway.

Good luck
Skeletor
New php-forum User
New php-forum User
 
Posts: 147
Joined: Tue Nov 19, 2002 7:47 am
Location: US, Ohio

Postby tww » Fri May 09, 2003 7:22 am

I spent $425.00 on this script and the programmer could not explain to me how to execute this file. I've been trying for over a week. I post to this forum and you give me the solution in less than an hour. I am truly grateful for your assistance. Right now I'm on cloud nine.

THANK YOU!!!
tww
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri May 09, 2003 6:12 am

Postby MithikoS » Sun May 11, 2003 8:41 pm

yeap install phpmyadmin to your server... and you are done
MithikoS
New php-forum User
New php-forum User
 
Posts: 8
Joined: Sun May 11, 2003 7:56 pm
Location: London

Postby Oleg Butuzov » Sun May 11, 2003 9:55 pm

some times i can nt use phpmyadmin at the server so i use step by stap query runner

for each query...

<?
## connect stuff

mysql_query("CREATE TABLE mem_members (
iduser INT NOT NULL AUTO_INCREMENT,
activeflag BIGINT NOT NULL DEFAULT 0,
userid VARCHAR(15) NOT NULL DEFAULT '',
pswrd VARCHAR(15) NOT NULL DEFAULT '',
fname VARCHAR(25) NOT NULL DEFAULT '',
lname VARCHAR(25) NOT NULL DEFAULT '',
mname VARCHAR(25) NOT NULL DEFAULT '',
year VARCHAR(4) NOT NULL DEFAULT '',
address1 VARCHAR(25) NOT NULL DEFAULT '',
address2 VARCHAR(25) NOT NULL DEFAULT '',
city VARCHAR(25) NOT NULL DEFAULT '',
state VARCHAR(25) NOT NULL DEFAULT '',
zip VARCHAR(25) NOT NULL DEFAULT '',
country VARCHAR(25) NOT NULL DEFAULT '',
hphone VARCHAR(25) NOT NULL DEFAULT '',
wphone VARCHAR(25) NOT NULL DEFAULT '',
email VARCHAR(100) NOT NULL DEFAULT '',
web VARCHAR(100) NOT NULL DEFAULT '',
category VARCHAR(25) NOT NULL DEFAULT '',
usertype BIGINT NOT NULL DEFAULT 0,
activedate date NOT NULL DEFAULT '0000-00-00',
PRIMARY KEY(iduser)
)");
?>

425 $ to expencive for such work....
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 9 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron