CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Installing table MySQL for applications

Print topic Send  topic

Author Message
reeljustice
Posted: 02/06/2002, 9:46 PM

I downloaded the applications from the site and attempted to use the SQL files to create and populate the MySQL tables. I first had to change the "GO" statements at the end of each line to a ; I then used the "DROP TABLE IF EXISTS xxxxx; instead of the syntax which existed. In the Classifieds application, I was able to get the categories and members tables to install. However, I have not been able to get the ads table to install.

I am running PHP4 and MySQL 3.?? on a Windows machine. These are running fine with numerous other applications/packages such as PostNuke and The Perfect Job found on devshed.

Here is the code I used:
DROP TABLE IF EXISTS categories;

create table categories (
category_id tinyint(5) NOT NULL auto_increment,
name varchar(50),
par_category_id integer,
PRIMARY KEY (category_id)
)
;

insert into categories (name, par_category_id) values ('Announcements', null)
;
insert into categories (name, par_category_id) values ('Autos & Motorcycles', null)
;
insert into categories (name, par_category_id) values ('Business Opportunities', null)
;
insert into categories (name, par_category_id) values ('Computers & Software', null)
;
insert into categories (name, par_category_id) values ('Employment', null)
;
insert into categories (name, par_category_id) values ('Services', null)
;
insert into categories (name, par_category_id) values ('Pets & Animals', null)
;
..........

DROP TABLE IF EXISTS members;

create table members
(
member_id tinyint(5) unsigned NOT NULL auto_increment,
member_login varchar(20) not null,
member_password varchar(20) not null,
member_level integer not null default 1,
name varchar(50) not null,
email varchar(50) not null,
home_phone varchar(50),
work_phone varchar(50),
location varchar(255),
PRIMARY KEY (member_id)
)
;

insert into members (member_login, member_password, member_level, name, email)
values ('admin', 'admin', 3, 'Administrator', 'admin@classifieds.com')
;

insert into members (member_login, member_password, member_level, name, email)
values ('guest', 'guest', 1, 'Guest', 'guest@classifieds.com')
;

This got the categories and members tables installed. I then tried the following:

DROP TABLE IF EXISTS ads

create table ads (
ad_id tinyint(5) unsigned NOT NULL auto_increment,
name varchar(100) not null,
ad_description text,
date_posted datetime,
price decimal(10,4),
fk_members tinyint(5) unsigned DEFAULT '0'not null,
fk_categories tinyint(5) unsigned DEFAULT '0' not null,
PRIMARY KEY (ad_id)
);

insert into ads (member_id, category_id, name, ad_description, date_posted, price)
values ('1', '23', 'Develop Classifieds Web Site', null, '12/15/2000', '10000')
;

THIS IS THE ERROR I GET when trying to install via myPHPmyAdmin


Error
SQL-query : [Edit]

DROP TABLE IF EXISTS ads

create table ads (
ad_id tinyint(5) unsigned NOT NULL auto_increment,
name varchar(100) not null,
ad_description text,
date_posted datetime,
price decimal(10,4),
fk_members tinyint(5) unsigned DEFAULT '0'not null,
fk_categories tinyint(5) unsigned DEFAULT '0' not null,
PRIMARY KEY (ad_id)
)


MySQL said:


You have an error in your SQL syntax near 'create table ads (
ad_id tinyint(5) unsigned NOT NULL auto_increment,
name' at line 3



I would appreciate some guidance on these applications, else, I will just have to drop them.

Thank you,
Reeljustice
AmmoniAc
Posted: 02/07/2002, 1:06 AM

Hi
Take a good phpMyAdmin version, with phpMyAdmin-2.2.1 or + its work fine.
I have this problem with an Eyebox and corect it with this change.

Best regards
Etienne

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.