Jump to content

Newb In need of advice/help.


jscix

Recommended Posts

Okay, first off i'm a noob, (Also I hope this is the right forum for this.) I just started learning php 18 hours ago..  so yeah, laugh it up if nessecary,  but someone point me in the right direction please. :)

 

 

I am reading:

 

Learning PHP and MySQL

By Michele Davis, Jon Phillips

 

I Just got to the SQL Databases chapter.

The problem is... I am using a remote web server to practice PHP.

I did not install SQL/PHP on my machine, and I would rather not.

 

Ok, Here is what I am trying to do. --->

 

Chapter Reference:

----------------------------------------------------

7.2.1. Creating Tables

Use the create table command to specify the structure of new database tables. When you create a database table, each column has a few options, in addition to the column names and data types. Values that must be supplied when adding data to a table use the NOT NULL keyword. The PRIMARY KEY keyword tells MySQL which column to use as a key field. Then, you have MySQL automatically assign key values by using the AUTO_INCREMENT keyword.

 

To create these tables, paste the code into the MySQL command-line client.

 

Example 7-1 creates the books table using the data types from Table 7-8.

 

Example 7-1.

CREATE TABLE books (

title_id INT NOT NULL AUTO_INCREMENT,

title VARCHAR (150),

pages INT,

PRIMARY KEY (title_id));

CREATE TABLE authors (

author_id INT NOT NULL AUTO_INCREMENT,

title_id INT NOT NULL,

author VARCHAR (125),

PRIMARY KEY (author_id));

----------------------------------------------------

 

Now since I am using a remote web server to practice, how would I go about creating a table in SQL?

My web server has PHP/SQL, so.. I would assume there is a "MySQL command-line client" of some kind that I can use?

 

If so:

How do I access/use it?

 

 

Sorry if im asking the wrong questions/whatever. someone help me out? :o

 

ty.

 

 

Link to comment
https://forums.phpfreaks.com/topic/37709-newb-in-need-of-advicehelp/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.