Well, a few rules exist :-)
First, to learn about proper use of quotes, check out these two resources :
This applies everywhere, including within mysql_query. Now if you look here :
Note the following is shown :
create table contact(id int not null auto_increment,
name varchar(32),
email varchar(32),
extension int(5),
nick varchar(32),
primary key(id));
Which can be run like this :
$result = mysql_query(" create table contact(id int not null auto_increment,
name varchar(32),
email varchar(32),
extension int(5),
nick varchar(32),
primary key(id)) ");
At any rate, it's important to understand the basics of PHP before jumping into it, hopefully this helps.