|
|
|
|
![]() ![]() |
Jun 17 2008, 03:40 PM
Post
#1
|
|
|
Newbie [Level 1] ![]() Group: [HOSTED] Posts: 18 Joined: 15-June 08 From: Work Member No.: 63,656 |
i can not make a sql for diff srcipt, but the sricpt i have is php, DJ-cpanel.. all tho i can not install it the error is like this
Creating Database Tables No database selected there a mysql database is made, but i can not use it for othere stuff... plz note that this is Free script and not for paid.. is there a way that the myqsul can not use sql other scripts? or it maybe not working... but i am not sure if the script not working or it can be the server may be down on mysql...? |
|
|
|
Jun 17 2008, 04:01 PM
Post
#2
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 221 Joined: 12-May 08 From: Istanbul, Turkey Member No.: 62,045 |
If I understood right, you can't create the tables in a database.
1. Firstly you must create a database. To do this, click MySQL Databases in Databases section. Enter your database name in New database: textbox, and click Create Database. 2. After creation of database go back to cpanel index and click PhpMyAdmin in Databases section. After entering PhpMyAdmin on the left coulomb there is the database you created. Click on it. In the new page click SQL and you can write your sql codes, it must run well now. This post has been edited by Erdemir: Jun 17 2008, 04:08 PM |
|
|
|
Jun 17 2008, 04:10 PM
Post
#3
|
|
|
Newbie [Level 1] ![]() Group: [HOSTED] Posts: 18 Joined: 15-June 08 From: Work Member No.: 63,656 |
can it work on auto? like make the tables by it self? becuse i don't know how to do that, and then i been using mysql befor. but idon't know how to set up tables.. i having learn that yet..and 2 is there a way to bypass it with out doing it? and install it fine?
or is there a way to like make it work... or do i have to still do the tables? If I understood right, you can't create the tables in a database. Firstly you must create a database. To do this, click MySQL Databases in Databases section. Enter your database name in New database: textbox, and click Create Database. After creation of database go back to cpanel index and click PhpMyAdmin in Databases section. After entering PhpMyAdmin on the left coulomb there is the database you created. Click on it. In the new page click SQL and you can write your sql codes, it must run well now. |
|
|
|
Jun 17 2008, 04:38 PM
Post
#4
|
|
|
Newbie [Level 1] ![]() Group: [HOSTED] Posts: 21 Joined: 31-October 07 Member No.: 52,277 |
how to create table
i mention 2 ways: 1. go to 'Databases' in cpanel, select phpmyadmin go to your database, u will see the 'create table' form - that's it u're looking for 2. create a script and run it insert this code into this: CODE <?php // Make a MySQL Connection mysql_connect("localhost", "admin", "1admin") or die(mysql_error()); mysql_select_db("test") or die(mysql_error()); // Create a MySQL table in the selected database mysql_query("CREATE TABLE example( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), age INT)") or die(mysql_error()); echo "Table Created!"; ?> replace the parameters u need |
|
|
|
Jun 17 2008, 05:06 PM
Post
#5
|
|
|
Newbie [Level 1] ![]() Group: [HOSTED] Posts: 18 Joined: 15-June 08 From: Work Member No.: 63,656 |
where do i add this? there no box to put it in ?
how to create table i mention 2 ways: 1. go to 'Databases' in cpanel, select phpmyadmin go to your database, u will see the 'create table' form - that's it u're looking for 2. create a script and run it insert this code into this: CODE <?php // Make a MySQL Connection mysql_connect("localhost", "admin", "1admin") or die(mysql_error()); mysql_select_db("test") or die(mysql_error()); // Create a MySQL table in the selected database mysql_query("CREATE TABLE example( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), age INT)") or die(mysql_error()); echo "Table Created!"; ?> replace the parameters u need |
|
|
|
Jun 17 2008, 08:28 PM
Post
#6
|
|
|
Newbie [Level 1] ![]() Group: [HOSTED] Posts: 21 Joined: 31-October 07 Member No.: 52,277 |
have u never tried to program something?
if u have no idea how to make a php script, i don't understand, why do u ask anything about sql and databases ok...it isn't lost yet: just open notepad, copy the code with replaced parameters into the document, save it as a php document (.php) and upload it to your server, then type the url of the document...that's all |
|
|
|
Jun 17 2008, 09:40 PM
Post
#7
|
|
|
Newbie [Level 1] ![]() Group: [HOSTED] Posts: 18 Joined: 15-June 08 From: Work Member No.: 63,656 |
ok i get this all tho MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<?php// Make a MySQL Connectionmysql_connect("localhost", "hellrad_djlogin", "he' at line 1 i did like put all the info in it, but it still can't connect to it at all? i am not sure what i am doing wrong here? but i need like a umm some one walk me tho it and not skip it, i know u are trying to help me but... it don't me any idea why the Mysql can't not work... have u never tried to program something?
if u have no idea how to make a php script, i don't understand, why do u ask anything about sql and databases ok...it isn't lost yet: just open notepad, copy the code with replaced parameters into the document, save it as a php document (.php) and upload it to your server, then type the url of the document...that's all This post has been edited by 666hellradio: Jun 17 2008, 10:04 PM |
|
|
|
Aug 19 2008, 03:49 PM
Post
#8
|
|
|
Trap Double Mocha Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,360 Joined: 21-September 07 Member No.: 50,369 |
Ok I had the same problem and I realized that even though I had set up a username and password, I had not associated that username with that database. I went into mySQL database and went to Add User To Database and picked my username and database...Voila! I'm in!
-reply by Puskit |
|
|
|
![]() ![]() |
Similar Topics