I'm a PHP beginning. I'm trying to create a database using the 'RUN' command. I'm using a tutorial from <!-- w --><a class="postlink" href="http://www.webmonkey.com">www.webmonkey.com</a><!-- w -->. No matter how many times I follow the instructions I get the following error:
Warning: Supplied argument is not a valid MySQL result resource in d:\nusphere\apache/htdocs/connect.php on line 19
First Name:
Warning: Supplied argument is not a valid MySQL result resource in d:\nusphere\apache/htdocs/connect.php on line 20
Last Name:
Warning: Supplied argument is not a valid MySQL result resource in d:\nusphere\apache/htdocs/connect.php on line 21
Address:
Warning: Supplied argument is not a valid MySQL result resource in d:\nusphere\apache/htdocs/connect.php on line 22
Position:
I know its because my table doesn't exist. I'm in Windows NT trying to create the datbase using the following instructions:
The first thing we need to do is create the actual database. From the command line, type:
mysqladmin -u root create mydb
That creates a database called "mydb." The flag tells MySQL that we're doing this as the root user.
Next we'll add some data using everyone's favorite example, the employees database.
Copy and paste the following text to a file and save it in MySQL's bin directory. (I'll call the file mydb.dump.)
CREATE TABLE employees ( id tinyint(4) DEFAULT '0' NOT NULL AUTO_INCREMENT, first varchar(20), last varchar(20), address varchar(255), position varchar(50), PRIMARY KEY (id), UNIQUE id (id));INSERT INTO employees VALUES (1,'Bob','Smith','128 Here St, Cityname','Marketing Manager');
INSERT INTO employees VALUES (2,'John','Roberts','45 There St , Townville','Telephonist');
INSERT INTO employees VALUES (3,'Brad','Johnson','1/34 Nowhere Blvd, Snowston','Doorman');
If the lines wrap, make sure that each insert statement is on a new line. Now we'll insert it into the mydb database. From the command line, type:
mysql -u root mydb < mydb.dump
Any thoughts or similar experience???
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
Warning: Supplied argument is not a valid MySQL result resource in d:\nusphere\apache/htdocs/connect.php on line 19
First Name:
Warning: Supplied argument is not a valid MySQL result resource in d:\nusphere\apache/htdocs/connect.php on line 20
Last Name:
Warning: Supplied argument is not a valid MySQL result resource in d:\nusphere\apache/htdocs/connect.php on line 21
Address:
Warning: Supplied argument is not a valid MySQL result resource in d:\nusphere\apache/htdocs/connect.php on line 22
Position:
I know its because my table doesn't exist. I'm in Windows NT trying to create the datbase using the following instructions:
The first thing we need to do is create the actual database. From the command line, type:
mysqladmin -u root create mydb
That creates a database called "mydb." The flag tells MySQL that we're doing this as the root user.
Next we'll add some data using everyone's favorite example, the employees database.
Copy and paste the following text to a file and save it in MySQL's bin directory. (I'll call the file mydb.dump.)
CREATE TABLE employees ( id tinyint(4) DEFAULT '0' NOT NULL AUTO_INCREMENT, first varchar(20), last varchar(20), address varchar(255), position varchar(50), PRIMARY KEY (id), UNIQUE id (id));INSERT INTO employees VALUES (1,'Bob','Smith','128 Here St, Cityname','Marketing Manager');
INSERT INTO employees VALUES (2,'John','Roberts','45 There St , Townville','Telephonist');
INSERT INTO employees VALUES (3,'Brad','Johnson','1/34 Nowhere Blvd, Snowston','Doorman');
If the lines wrap, make sure that each insert statement is on a new line. Now we'll insert it into the mydb database. From the command line, type:
mysql -u root mydb < mydb.dump
Any thoughts or similar experience???
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->