Webmaster Forum

Bidding Directory   1,000 Directory Submissions   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 07-05-2004, 07:45 AM   #1 (permalink)
Inactive
 
Pipeline-Webdesign's Avatar
 
Join Date: 02-11-04
Location: Corpus Christi, TX
Posts: 901
iTrader: 0 / 0%
Latest Blog:
None

Pipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the rough
Send a message via AIM to Pipeline-Webdesign Send a message via MSN to Pipeline-Webdesign Send a message via Yahoo to Pipeline-Webdesign
[solved]MySQL ADD entries

the hosting that my company has doesn't have CPanel or PHPMYADMIN to access the MySQL database, so I'm having to edit the database strictly from scripts. I have a script that created the table and added the fields I needed and it worked fine. Now I need to add new fields to the table, but the old script isn't working. All I did was added the fields to the script. is there a different script i need to do to just ADD? here's the code... sorry it's so long...[code:1:93a49c63d4]<?
################################
# MySQL Variables - Must be configured first!
$sqlhost = "localhost";
$sqllogin = "unique";
$sqlpass = "#####";
$sqldb = "db_24389_1";
################################

$db = mysql_connect($sqlhost, $sqllogin, $sqlpass) or die("OOps!");
mysql_select_db($sqldb, $db);

$sql = "CREATE TABLE `NewHire` (
`firstname` VARCHAR( 250 ) NOT NULL ,
`middleinitial` VARCHAR( 250 ) NOT NULL ,
`lastname` VARCHAR( 250 ) NOT NULL ,
`id` INT NOT NULL ,
`name` VARCHAR( 250 ) NOT NULL ,
`pres_addr` VARCHAR( 250 ) NOT NULL ,
`pres_addr2` VARCHAR( 250 ) NOT NULL ,
`pres_yrs` VARCHAR( 15 ) NOT NULL ,
`pres_mth` VARCHAR( 15 ) NOT NULL ,
`prev_addr` VARCHAR( 250 ) NOT NULL ,
`prev__yrs` VARCHAR( 15 ) NOT NULL ,
`prev__mth` VARCHAR( 15 ) NOT NULL ,
`phone` VARCHAR( 20 ) NOT NULL ,
`ssn` VARCHAR( 20 ) NOT NULL ,
`ssn1` VARCHAR( 3 ) NOT NULL ,
`ssn2` VARCHAR( 2 ) NOT NULL ,
`ssn3` VARCHAR( 4 ) NOT NULL ,
`q1` ENUM( 'y', 'n' ) NOT NULL ,
`q1_cmt` TEXT NOT NULL ,
`q2` ENUM( 'y', 'n' ) NOT NULL ,
`q2_cmt` TEXT NOT NULL ,
`q3` ENUM( 'y', 'n' ) NOT NULL ,
`q3_cmt` TEXT NOT NULL ,
`pres_empl` VARCHAR( 250 ) NOT NULL ,
`pres_empl_addr` VARCHAR( 250 ) NOT NULL ,
`pres_empl_addr2` VARCHAR( 250 ) NOT NULL ,
`pres_empl_city` VARCHAR( 250 ) NOT NULL ,
`pres_empl_state` VARCHAR( 250 ) NOT NULL ,
`pres_empl_zip` VARCHAR( 250 ) NOT NULL ,
`pres_empl_phone` VARCHAR( 15 ) NOT NULL ,
`pres_empl_phone1` VARCHAR( 3 ) NOT NULL ,
`pres_empl_phone2` VARCHAR( 3 ) NOT NULL ,
`pres_empl_phone3` VARCHAR( 4 ) NOT NULL ,
`pres_empl_yr_st` VARCHAR( 15 ) NOT NULL ,
`pres_empl_yr_st_mth` VARCHAR( 15 ) NOT NULL ,
`pres_empl_yr_st_yr` VARCHAR( 15 ) NOT NULL ,
`pres_empl_yr_end` VARCHAR( 15 ) NOT NULL ,
`pres_empl_yr_end_mth` VARCHAR( 15 ) NOT NULL ,
`pres_empl_yr_end_yr` VARCHAR( 15 ) NOT NULL ,
`res_empl_pay_st` VARCHAR( 25 ) NOT NULL ,
`pres_empl_pay_st_dol` VARCHAR( 25 ) NOT NULL ,
`pres_empl_pay_st_cen` VARCHAR( 25 ) NOT NULL ,
`pres_empl_pay_end` VARCHAR( 25 ) NOT NULL ,
`pres_empl_pay_end_dol` VARCHAR( 25 ) NOT NULL ,
`pres_empl_pay_end_cen` VARCHAR( 25 ) NOT NULL ,
`pres_empl_title` VARCHAR( 250 ) NOT NULL ,
`pres_empl_super` VARCHAR( 250 ) NOT NULL ,
`pres_empl_reason` TEXT NOT NULL ,
`prev_empl` VARCHAR( 250 ) NOT NULL ,
`prev_empl_addr` VARCHAR( 250 ) NOT NULL ,
`prev_empl_addr` VARCHAR( 250 ) NOT NULL ,
`prev_empl_city` VARCHAR( 250 ) NOT NULL ,
`prev_empl_state` VARCHAR( 250 ) NOT NULL ,
`prev_empl_zip` VARCHAR( 250 ) NOT NULL ,
`prev_empl_phone` VARCHAR( 15 ) NOT NULL ,
`prev_empl_phone1` VARCHAR( 3 ) NOT NULL ,
`prev_empl_phone2` VARCHAR( 3 ) NOT NULL ,
`prev_empl_phone3` VARCHAR( 4 ) NOT NULL ,
`prev_empl_yr_st` VARCHAR( 15 ) NOT NULL ,
`prev_empl_yr_st_mth` VARCHAR( 15 ) NOT NULL ,
`prev_empl_yr_st_yr` VARCHAR( 15 ) NOT NULL ,
`prev_empl_yr_end` VARCHAR( 15 ) NOT NULL ,
`prev_empl_yr_end_mth` VARCHAR( 15 ) NOT NULL ,
`prev_empl_yr_end_yr` VARCHAR( 15 ) NOT NULL ,
`prev_empl_pay_st` VARCHAR( 25 ) NOT NULL ,
`prev_empl_pay_st_dol` VARCHAR( 25 ) NOT NULL ,
`prev_empl_pay_st_cen` VARCHAR( 25 ) NOT NULL ,
`prev_empl_pay_end` VARCHAR( 25 ) NOT NULL ,
`prev_empl_pay_end_dol` VARCHAR( 25 ) NOT NULL ,
`prev_empl_pay_end_cen` VARCHAR( 25 ) NOT NULL ,
`prev_empl_title` VARCHAR( 250 ) NOT NULL ,
`prev_empl_super` VARCHAR( 250 ) NOT NULL ,
`prev_empl_reason` TEXT NOT NULL ,
`prev2_empl` VARCHAR( 250 ) NOT NULL ,
`prev2_empl_addr` VARCHAR( 250 ) NOT NULL ,
`prev2_empl_addr2` VARCHAR( 250 ) NOT NULL ,
`prev2_empl_city` VARCHAR( 250 ) NOT NULL ,
`prev2_empl_state` VARCHAR( 250 ) NOT NULL ,
`prev2_empl_zip` VARCHAR( 250 ) NOT NULL ,
`prev2_empl_phone` VARCHAR( 15 ) NOT NULL ,
`prev2_empl_phone1` VARCHAR( 3 ) NOT NULL ,
`prev2_empl_phone2` VARCHAR( 3 ) NOT NULL ,
`prev2_empl_phone3` VARCHAR( 4 ) NOT NULL ,
`prev2_empl_yr_st` VARCHAR( 15 ) NOT NULL ,
`prev2_empl_yr_st_mth` VARCHAR( 15 ) NOT NULL ,
`prev2_empl_yr_st_yr` VARCHAR( 15 ) NOT NULL ,
`prev2_empl_yr_end` VARCHAR( 15 ) NOT NULL ,
`prev2_empl_yr_end_mth` VARCHAR( 15 ) NOT NULL ,
`prev2_empl_yr_end_yr` VARCHAR( 15 ) NOT NULL ,
`prev2_empl_pay_st` VARCHAR( 25 ) NOT NULL ,
`prev2_empl_pay_st_dol` VARCHAR( 25 ) NOT NULL ,
`prev2_empl_pay_st_cen` VARCHAR( 25 ) NOT NULL ,
`prev2_empl_pay_end` VARCHAR( 25 ) NOT NULL ,
`prev2_empl_pay_end_dol` VARCHAR( 25 ) NOT NULL ,
`prev2_empl_pay_end_cen` VARCHAR( 25 ) NOT NULL ,
`prev2_empl_title` VARCHAR( 250 ) NOT NULL ,
`prev2_empl_super` VARCHAR( 250 ) NOT NULL ,
`prev2_empl_reason` TEXT NOT NULL ,
`emp_gaps` TEXT NOT NULL ,
`accomplish` TEXT NOT NULL ,
`agree` ENUM( 'y', 'n' ) NOT NULL ,
`signature` VARCHAR( 250 ) NOT NULL ,
`date` DATE NOT NULL ,
`date_mth` DATE NOT NULL ,
`date_day` DATE NOT NULL ,
`date_yr` DATE NOT NULL ,
UNIQUE (
`id`
)
) TYPE=MyISAM;";
$result = mysql_query($sql) or die("Failed: $sql - ".mysql_error());

?>[/code:1:93a49c63d4]
Pipeline-Webdesign is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 07-05-2004, 08:45 AM   #2 (permalink)
Inactive
 
Pipeline-Webdesign's Avatar
 
Join Date: 02-11-04
Location: Corpus Christi, TX
Posts: 901
iTrader: 0 / 0%
Latest Blog:
None

Pipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the rough
Send a message via AIM to Pipeline-Webdesign Send a message via MSN to Pipeline-Webdesign Send a message via Yahoo to Pipeline-Webdesign
server gave me admin permission to install PHPMYADMIN... woohoo... stupid host
Pipeline-Webdesign is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-05-2004, 09:49 AM   #3 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 4,904
iTrader: 0 / 0%
Latest Blog:
A+ Certification

kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
phpmyadmin is just a script.. you could just upload it to your user directory and change settings for your user/pass.. dont see why they can forbid that.
__________________
Kyle Varga
"m3lt/theSpear"
student, web designer/coder, future IT consultant
Experience: PHP/MySQL, Java, C++, MS-SQL
kwvarga is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-05-2004, 09:54 AM   #4 (permalink)
Inactive
 
Pipeline-Webdesign's Avatar
 
Join Date: 02-11-04
Location: Corpus Christi, TX
Posts: 901
iTrader: 0 / 0%
Latest Blog:
None

Pipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the roughPipeline-Webdesign is a jewel in the rough
Send a message via AIM to Pipeline-Webdesign Send a message via MSN to Pipeline-Webdesign Send a message via Yahoo to Pipeline-Webdesign
b/c they SUCK... haha... i dunno... i'm prob just dumb
Pipeline-Webdesign is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can it be solved? Providence Web Hosting Forum 13 07-21-2007 11:09 AM
[solved]PHP --> MySQL Errors Pipeline-Webdesign Coding Forum 5 07-06-2004 11:38 AM
[solved] mailform Pipeline-Webdesign Coding Forum 20 06-14-2004 08:38 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:55 AM.
© Copyright 2008 V7 Inc