I have inherited a set of files that requires access to a mysql db (and I dont know a darn thing about db, but, am willing to learn)
The db uses this script - below to write tables and records to the db (or supposedly does - I could be wrong) I made the DB OK and have it recognized by the admin script however its looking for records and tables that don't exist... yet...
here is the db install script
but when I go to the page it doesnt appear to do anything - what am I doing wrong? Shouldn't there be more to the script than this?
The db uses this script - below to write tables and records to the db (or supposedly does - I could be wrong) I made the DB OK and have it recognized by the admin script however its looking for records and tables that don't exist... yet...
here is the db install script
Code:
--
-- Create schema phpstorelocator
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ phpstorelocator;
USE phpstorelocator;
DROP TABLE IF EXISTS `slstate`;
CREATE TABLE `slstate` (
`stateID` int(10) unsigned NOT NULL auto_increment,
`statename` varchar(100) default '',
`recordlastmodified` timestamp NOT NULL default '0000-00-00 00:00:00',
`recordlastmodifiedby` varchar(50) default '',
`recordcreated` timestamp NOT NULL default '0000-00-00 00:00:00',
`recordcreatedby` varchar(50) default '',
PRIMARY KEY (`stateID`)
);
DROP TABLE IF EXISTS `slstore`;
CREATE TABLE `slstore` (
`storeID` int(10) unsigned NOT NULL auto_increment,
`companystoreID` varchar(50) default '',
`storename` varchar(100) default '',
`address` varchar(100) default '',
`city` varchar(50) default '',
`suburb` varchar(50) default '',
`stateID` int(10) unsigned default '0',
`country` varchar(50) default '',
`zippostcode` varchar(20) default '',
`telephone1` varchar(20) default '',
`telephone2` varchar(20) default '',
`fax` varchar(20) default '',
`email` varchar(100) default '',
`website` varchar(100) default '',
`description` varchar(255) default '',
`openmonday` varchar(20) default '',
`closemonday` varchar(20) default '',
`opentuesday` varchar(20) default '',
`closetuesday` varchar(20) default '',
`openwednesday` varchar(20) default '',
`closewednesday` varchar(20) default '',
`openthursday` varchar(20) default '',
`closethursday` varchar(20) default '',
`openfriday` varchar(20) default '',
`closefriday` varchar(20) default '',
`opensaturday` varchar(20) default '',
`closesaturday` varchar(20) default '',
`opensunday` varchar(20) default '',
`closesunday` varchar(20) default '',
`opencloseinfo` varchar(255) default '',
`storemanager` varchar(50) default '',
`maplink` varchar(150) default '',
`directions` varchar(255) default '',
`recordstatus` varchar(20) default '',
`recordlastmodified` timestamp NOT NULL default '0000-00-00 00:00:00',
`recordlastmodifiedby` varchar(50) default '',
`recordcreated` timestamp NOT NULL default '0000-00-00 00:00:00',
`recordcreatedby` varchar(50) default '',
PRIMARY KEY (`storeID`)
);
DROP TABLE IF EXISTS `sluser`;
CREATE TABLE `sluser` (
`userID` int(10) unsigned NOT NULL auto_increment,
`username` varchar(50) default '',
`password` varchar(50) default '',
`userfullname` varchar(50) default '',
`accesslevel` varchar(20) default '',
`recordstatus` varchar(20) default '',
`recordlastmodified` timestamp NOT NULL default '0000-00-00 00:00:00',
`recordlastmodifiedby` varchar(50) default '',
`recordcreated` timestamp NOT NULL default '0000-00-00 00:00:00',
`recordcreatedby` varchar(50) default '',
PRIMARY KEY (`userID`)
);
but when I go to the page it doesnt appear to do anything - what am I doing wrong? Shouldn't there be more to the script than this?