clown[NOR] Posted April 10, 2007 Share Posted April 10, 2007 This is my first attempt on working with MySQL... i tried to create a table and add a table to it... but i get this error: Parse error: syntax error, unexpected T_STRING in F:\root\install.php on line 3 <?php CREATE DATABASE `addressbook1` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; // This is line 3 CREATE TABLE contacts( ID INT NOT NULL PRIMARY KEY, FirstName VARCHAR(20) NOT NULL, LastName VARCHAR(20) NOT NULL, Address VARCHAR(50) NOT NULL, ZipCode INT NOT NULL, City VARCHAR(30) NOT NULL, Phone INT NOT NULL, CellPhone INT, Email VARCHAR(30), Website VARCHAR(50) ); ?> can anyone please help me on this one? just for the record... i'm running everything from my computer... incase that has anything to say Thanks in advance Regards, Clown Quote Link to comment https://forums.phpfreaks.com/topic/46359-solved-help-im-a-noob/ Share on other sites More sharing options...
AndyB Posted April 10, 2007 Share Posted April 10, 2007 Create the database from whatever database administration tool you installed (phpMyAdmin perhaps?) The general scheme for success at creating a table (or any other query) will be: make database connection select database construct SQL query execute query Reading any of the tutorials here about using a database will be time well spent. Quote Link to comment https://forums.phpfreaks.com/topic/46359-solved-help-im-a-noob/#findComment-225587 Share on other sites More sharing options...
clown[NOR] Posted April 10, 2007 Author Share Posted April 10, 2007 yeah I'm currently working my way trough this tutorial: http://www.freewebmasterhelp.com/tutorials/phpmysql/ ... but I'm stuck at one part..hehe.. trying to work it out Quote Link to comment https://forums.phpfreaks.com/topic/46359-solved-help-im-a-noob/#findComment-225859 Share on other sites More sharing options...
fenway Posted April 11, 2007 Share Posted April 11, 2007 I'm just seeing raw text in a PHP block... no strings, no query. Quote Link to comment https://forums.phpfreaks.com/topic/46359-solved-help-im-a-noob/#findComment-226688 Share on other sites More sharing options...
clown[NOR] Posted April 11, 2007 Author Share Posted April 11, 2007 meaning what fenway? could you please explain that a little bit more detailed? Quote Link to comment https://forums.phpfreaks.com/topic/46359-solved-help-im-a-noob/#findComment-227222 Share on other sites More sharing options...
fenway Posted April 11, 2007 Share Posted April 11, 2007 What do you expect PHP to do with that? Quote Link to comment https://forums.phpfreaks.com/topic/46359-solved-help-im-a-noob/#findComment-227223 Share on other sites More sharing options...
clown[NOR] Posted April 11, 2007 Author Share Posted April 11, 2007 oh like that... dude.. i'm really truly sorry... but this one is solved... sorry for wasting your time on this one... i just noticed now... Quote Link to comment https://forums.phpfreaks.com/topic/46359-solved-help-im-a-noob/#findComment-227250 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.