Комментарии:
All msql tags used in thesw tutorials are outdated.
Ответить$con = mysql_connect("localhost" ,"root" , "");
if(!$con){die(" could not conect".mysql_error());}
mysql_select_db("boston" ,$con );
Ok.. And what if I want to log in as different user with different privileges. I tried to create new user in phpmyadmin but when I change name and password in php file it always end up with error
Ответитьi got an query failed didnt notice i did not use this `
Ответитьuse backticks ` inside query these are not single-quotes or an apostrophe!
ОтветитьAwesome tutorials, it's great! :))))
Ответитьi type on an international keyboard. I have like a bunch of characters ,' ńǹ , sorry i forgot that.
Ответитьhes talking about when using PHP code. You will have to use something like this to use an apostrophe; echo ('don'/t')
ОтветитьALEX YOU FUCKIN ROCK!
Ответитьhrd to tell from that but it looks likse you're using single inverted commas rather than backticks. it's a bit naughty but easier to leave them off - SELECT food, calories FROM food you don't need order by id, it's the default sort field.
ОтветитьYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''food' ORDER BY 'id'' at line 1 $query = "SELECT 'food', 'calories' FROM 'food' ORDER BY 'id' ";
Ответитьhe does that to let you know that the file is being included into another file.
ОтветитьJust for tutorial Purposes.
ОтветитьConnect 'OK' , 'Query failed'
Ответитьremember that single quotes are not apostrophes. There is a difference and I made the mistake. Look out for that.
Ответить@LetsSpotIt it stands for "include". like an "include" file that index.php needs. either "include" or "require".. same thing.
Ответитьwhat does 'inc' stand for in the file name?
ОтветитьShould of set healthy_unhealthy to U by default just like real life :p
Ответитьits not working for me... it only sends me to the index of php?
Ответить@Dalwanaage Cause he doesn't proper sense at all.
Ответитьgreat tut
ОтветитьWhy using bad language please.
Ответить