Pavlin24 Posted October 21, 2013 Share Posted October 21, 2013 Hallo. I need some help. I am trying to create table in DB. It appears an error, and I can not find what is wrong. Here is the code: <?phpini_set('display_errors', 1); error_reporting(E_ALL); $con=msql_connect("localhost","pavlinan_db","mishon24");mysql_select_db("pavlinan_db");$sql="CREATE TABLE rabotna(id int not null auto_increment,col1,col2,col3,PRIMARY KEY(id));if(mysql_query($sql,$con)){echo "Таблицата е създадена успешно";}else{echo "Грешка при създаването на таблицата ".mysql_error($con);}?> And here is the error message: Parse error: in /home/pavlinan/public_html/upload/test.php on line 11 Link to comment Share on other sites More sharing options...
birbal Posted October 21, 2013 Share Posted October 21, 2013 it is php error not mysql. you have missed closing quote in $sql; Link to comment Share on other sites More sharing options...
Pavlin24 Posted October 21, 2013 Author Share Posted October 21, 2013 ugfff Thank you ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now