nightone78

Member
Dec 15, 2008
10
0
51
Not sure if this the right place to post this....

I have created a MySQL database to use for a login script that I want to install. I also have a MySQL table, but know where I need to put/save the table so that it works right. Any help would be greatly appreciated.
 

ddeo

Active Member
Sep 4, 2007
38
0
56
You should be able to enter your table sytax using MyPHPAdmin, there is a link to this under databases in Cpanel. Hope that helps...
 

yolau

Active Member
Sep 1, 2008
31
0
56
save your table as txt file.
Then go to phpMyAdmin --> Import and select your text file to import it into the database.
 

nightone78

Member
Dec 15, 2008
10
0
51
When I'm uploading, do I need to worry about what the SQL compatibility mode is set to? Or should I just leave it as none?
 

nightone78

Member
Dec 15, 2008
10
0
51
I tried uploading the following table:

Code:
CREATE TABLE  `users` (
 `id` INT( 20 ) NOT NULL AUTO_INCREMENT ,
 `full_name` VARCHAR( 200 ) COLLATE latin1_general_ci NOT NULL DEFAULT  '',
 `user_name` VARCHAR( 200 ) COLLATE latin1_general_ci NOT NULL DEFAULT  '',
 `user_pwd` VARCHAR( 200 ) COLLATE latin1_general_ci NOT NULL DEFAULT  '',
 `user_email` VARCHAR( 200 ) COLLATE latin1_general_ci NOT NULL DEFAULT  '',
 `activation_code` INT( 10 ) NOT NULL DEFAULT  '0',
 `joined` DATE NOT NULL DEFAULT  '0000-00-00',
 `country` VARCHAR( 100 ) COLLATE latin1_general_ci NOT NULL DEFAULT  '',
 `user_activated` INT( 1 ) NOT NULL DEFAULT  '0',
PRIMARY KEY (  `id` )
)
And I returned the following:

MySQL returned an empty result set (i.e. zero rows)

So what do I need to do to fix this?
 

sjep

Member
Dec 15, 2008
7
0
51
MySQL returned an empty result set
But you're table is created I guess?

An empty result set means that there aren't records in the table yet.

If you would want to import records into that table, you can use for example the following SQL:

Code:
INSERT INTO `users` (`id`, `full_name`, `user_name`, `user_pwd`, `user_email`, `activation_code`, `joined`, `country`, `user_activated`) VALUES
(1, 'full name', 'user name', 'user pwd', 'user email', 123, '2008-12-22', 'France', 1);
 

nightone78

Member
Dec 15, 2008
10
0
51
Okay, help me out a little here....

Where would I put the results in the actual code? I've never worked with sql before, and really have no idea what I'm doing....
 

sjep

Member
Dec 15, 2008
7
0
51
lol, you have no idea :)

Maybe you should tell us what you want to do.
And then tell us how you would like to do that ...


Just to have some more information because now I don't understand a lot of what you want