I need a little help my the sql business. To be honest I'm rather new at this but I'm eager to edit, mod, and program sites up to make them better. And on top of that, I don't enjoy messing things up until the site won't work. I'll lay out the problem I'm having with the sql for an Arcade website I got. In this arcade people can sign up and become a mamber. Not only that but fill out a small profile. I wanted to upgrade that profile because there was only plays, location, interests, msn, and website. So I added a few more: age, height, fav movie, fav music, petpeeves, os, browser, aim, and yahoo. It seemed to work fine with me messing with the PHP http://img.photobucket.com/albums/v64/Gravetzt/gprofileediting.gif http://img.photobucket.com/albums/v64/Gravetzt/gprfilelist.gif Everything is showing up alright, but it's where the sql is that I don't know where to begin. The .sql is setup like this: 1. I tried to make an .sql file and just added the new one's with these in the same order they are in with the php. didn't work 2. Then I made a new .sql file and just had the new entries without these one's here. After I imported it.......didn't work 3. Finally I trying to add them all manually right in my .sql database from my host. didn't work How can I get it to work? What can be wrong?
I suspect your trying to create a table that already exists. Try using alter table instead.. alter table YOURTAABLE add column flavor varchar (20) ; Code (markup): More info: http://php.about.com/od/learnmysql/p/alter_table.htm
I have no idea. lol. I don't know Sql well. Whoa, Now I see it. I might as well try again, then. I took out the last wording with the AUTO_INCREMENT=39 ; didn't work
Run this. I will drop any tables that you have currently that match ava_users DROP TABLE IF EXISTS `ava_users`; CREATE TABLE `ava_users` ( `id` int(10) unsigned NOT NULL auto_increment, `username` varchar(200) NOT NULL default '', `password` varchar(50) NOT NULL default '', `email` varchar(30) NOT NULL default '', `activate` char(1) NOT NULL default '', `about` varchar(200) NOT NULL default '', `group` varchar(40) NOT NULL default '', `location` varchar(50) NOT NULL default '', `interests` text NOT NULL, `msn` varchar(40) NOT NULL default '', `website` varchar(200) NOT NULL default '', `admin` char(2) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=39 ; Code (markup):
The first query failed because you did not have a space between =39 and DEFAULT. The second what not using the correct ALTER TABLE syntax. The solution proposed by tanfwc should work, though.
I'm going to try this for sure........That is once I fix it after the blasted thing was HACKED by some dude on digital point named melol2.
Have you made forms that will add the values with the database to the database when the POST form is sent? Such as the INSERT INTO command?