Jump to content
php.lv forumi

Myqsl lieks ieraksts


Raivis.purins

Recommended Posts

turpinot izglītoties saskāros ar šādām te dīvainībām:

<?php
//taisam konekciju ar datubāzi
mysql_connect("localhost","raivispurins","baroms1981") or die(mysql_error());
echo "connected to MYSQL<br>";
mysql_select_db("raivispurins")	or die(mysql_error());

//ievieto informāciju tabulā
mysql_query("INSERT INTO example
(name,age) VALUES('Timmy Mellowman','23')") or die (mysql_error());

mysql_query("INSERT INTO example
(name,age) VALUES('Sandy Smith','21')") or die(mysql_error());

mysql_query("INSERT INTO example
(name,age) VALUES('Bobby Wallace','15')") or die(mysql_error());

echo "dati ielikti";

?>

 

galu rezultātā phpmyadminī saņemu šitādu tabulu:

3331626104_5a348344de.jpg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...