Kahuki Webmaster Forum  

Go Back   Kahuki Webmaster Forum > Website Development & Management > Programming > PHP

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-07-2007, 08:45 AM
Member
 
Join Date: Aug 2006
Posts: 56
bill is on a distinguished road
HEEEELP!!! (MySQL experts / experienced coding using MySQL)?

I am used to code my queries using the oracle software which is 8i. I am new to MySQL. I tried to code:

mysql>CREATE TABLE BOOKS(title VARCHAR(15), type VARCHAR(10), author VARCHAR(30), published DATE);

but an error message occured instead...
"ERROR 1046 (3D000):No database selected"

Why it creates an error? Why the error stated "No database selected" when the codes I used is not to select but to create a table?Are codes in MySQL and ORACLE the same? What should be the proper way done? Is it the error in the installation process?

Please help me solve my problem. I am using MySQL server 5.0.

I am a fresh graduate programmer, so I know a bit of "programming /(software) and hardware terminologies"

Reply With Quote
  #2 (permalink)  
Old 06-07-2007, 08:56 AM
Rookie
 
Join Date: May 2006
Posts: 6
nitinparwal is on a distinguished road
It means you havent selected a database to create the table into.
Have you created a database to insert the table into??

To select/use a database: USE <databaseName>;
To create a database: create database <databaseName>;

Reply With Quote
  #3 (permalink)  
Old 06-07-2007, 09:00 AM
Zatoichi's Avatar
Member
 
Join Date: Apr 2006
Posts: 71
Zatoichi is on a distinguished road
You have to select the database where you want to create the table. Have you created the database?

Try this command to select the database

USE databasename;

Reply With Quote
  #4 (permalink)  
Old 06-07-2007, 09:47 AM
Rookie
 
Join Date: May 2007
Posts: 2
ryandesign is on a distinguished road
The problem is that u havent selected a database to create the table.

*to select a database
database: USE <databaseName>;

*to create a database
create database <databaseName>;

if you are new to mysql I prefer you to use phpmyadmin panel for database codings.

http://.....mysql_server path/phpmyadmin/

http://192.168.10.1/phpmyadmin/

it would be somethin like these....

Reply With Quote
Reply

Bookmarks

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

BB 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
how to upload mySQL database to my webhost? At my machine, mySQL uses innodb engine, which is disabled on host Schlase PHP 2 05-25-2007 02:37 PM
How to Update MYSQL database table based on mysql query array? blackfox PHP 2 03-30-2007 01:11 AM
how to connect mysql using php 5?mysql is not activated by default...so error message is shown....what to do? Jason M PHP 2 03-15-2007 05:25 PM
MySQL & MySQL Server Removal Help Needed Please? I feel so dumb to be this damn smart!? blackfox PHP 1 11-26-2006 05:27 PM
Zulu Pad "PHP MYSQL program exactly like ZuluPad that you can put up on a web server and sync to MYSQL? baggiho PHP 1 10-10-2006 06:24 AM


All times are GMT. The time now is 08:58 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0