I need a basic tutorial on MySql!!!!!!!!!

mariannaguide56

New Member
Messages
6
Reaction score
0
Points
0
Hi ,
Just a "one cent" opinion .
Don't use Mysql anymore it's outdated and according to php.net it's depreciated (in future releases it will not be supported anymore ) . If you insist to use this old extension , code your scripts according to security standards or you can be a victim of SQL-injection .
Fortunately this web-host support the newer extensions ( mysqli and PDO ) . Use them instead , as these are the future methods of database-driven web-development . Beside all the new features , these extensions support OOP coding methodology and prepared statements . Have a look at this nice article " Using PDO Objects in PHP " .
Happy coding :)
 

cybrax

Community Advocate
Community Support
Messages
764
Reaction score
27
Points
0
Every cent counts and yes the PDO syntax is a little bit tidier and does provide some new features that give an extra layers of protection.

However much of the internal structure remains the same as old SQL plus many of the advanced tutorials and code snippets across the web have NOT been rewritten for PDO yet. So for anybody just getting started with databses would benefit from a basic understanding of SQL then move up/over to PDO once they feel more comfortable.

PHP:
# Regular mySQL
mysql_query("INSERT INTO folks (name, addr, city) values ($name, $addr, $city)");


# PDO with named placeholders
$STH = $DBH->("INSERT INTO folks (name, addr, city) value (:name, :addr, :city)");
 
Top