MySQL¶à±íͬʱ²åÈë
Real example:
/*************************by garcon1986*********************************************************/
<?php
// get the values from entreprise creation form
$secteur = $_POST['secteur'];
$nom = $_POST['nom_entreprise'];
$taille = $_POST['taille_entreprise'];
$concurrent = $_POST['concurrent_entreprise'];
$investisseur = $_POST['investisseur_entreprise'];
$partenaire = $_POST['partenaire_entreprise'];
$client = $_POST['client_entreprise'];
$fournisseur = $_POST['fournisseur_entreprise'];
$info_general = $_POST['information_generale'];
//connection
//include("./conn/connect.php");
$conn = mysql_connect("localhost","charles","charles") or die("connection failed: ".mysql_error());
mysql_select_db("crm") or die("select db failed: ".mysql_error());
//execution - using trasaction
mysql_query('START TRANSACTION',$conn) or die(mysql_error());
mysql_query("insert into entreprise(nom, nombre_salarie, secteur, info_general) values('".$nom."','".$taille."','".$secteur."','".$info_general."')",$conn) or die(mysql_error());
$id = mysql_insert_id($conn) or die(mysql_error());
mysql_query("insert into concurrent(entreprise_id, nom) values('".$id."', '".$concurrent."')",$conn) or die(mysql_error());
mysql_query("insert into investisseur(entreprise_id, nom) values('".$id."', '".$investisseur."')",$conn) or die(mysql_error());
mysql_query("insert into partenaire(entreprise_id, nom) values('".$id."', '".$partenaire."')",$conn) or die(mysql_error());
mysql_query("insert into client(entreprise_id, nom) values('".$id."', '".$client."')",$conn) or die(mysql_error());
mysql_query("insert into fournisseur(entreprise_id, nom) values('".$id."', '".$fournisseur."')",$conn) or die(mysql_error())
Ïà¹ØÎĵµ£º
1. mysql Ð޸ıíÃû×Ö
ALTER TABLE t1 RENAME t2;
2. ÐÞ¸ÄÁеÄÃû×Ö
>ALTER TABLE stock CHANGE COLUMN stock_id id INT(6);
3. Ôö¼ÓÁÐ
>ALTER TABLE ab ADD COLUMN id INT(3);
4. ¼õÉÙÁÐ
>ALTER TABLE ab DROP COLUMN id;
5. ÐÞ¸ÄÁ ......
[part1] http://download.csdn.net/source/2076258
[part2] http://download.csdn.net/source/2076272
[part3] http://download.csdn.net/source/2076276
[part4] http://download.csdn.net/source/2076283
[part02-04] http://www.ytgps.com/Images/nginx.rar
±¾ÎļþÌå»ý¹ý´ó·Ö4¸ö°ü£¬php-cgi+mysql+nginx.7z ......
PHP ´æÈ¡ MySQL ÂÒÂëÎÊÌâ
ÉÏһƪ / ÏÂһƪ 2007-06-04 03:33:50 / ¸öÈË·ÖÀࣺPHPѧϰ
²é¿´( 239 ) / ÆÀÂÛ( 0 ) / ÆÀ·Ö( 0 / 0 )
MySQL µÄ×Ö·û¼¯Ö§³Ö(Character Set Support)ÓÐÁ½¸ö·½Ã棺×Ö·û¼¯(Character set)ºÍÅÅÐò·½Ê½(Collation)¡£¶ÔÓÚ×Ö·û¼¯µÄÖ§³Öϸ»¯µ½Ëĸö²ã´Î: ·þÎñÆ÷(server)£¬Êý¾Ý¿â(database)£¬Êý¾Ý±í ......
Ò»¡¢±íµ¥Ìá½»ÂÒÂë½â¾ö·½·¨
±íµ¥Öк¬ÓÐÖÐÎÄÌá½»ÂÒÂ룬¶ÔÓÚ×ÖĸºÍÊý×ÖÔò²»»áÂÒÂ룬ÎÒÑ¡ÓõÄ×Ö·û¼¯utf-8(ÒÔÏÂͬ)¡£
1¡¢ÔÚapache-tomcat-6.0.18\webapps\examples\WEB-INF\classes\filtersĿ¼ÏÂÕÒµ½ÎļþSetCharacterEncodingFilter.java ºÍRequestDumperFilter.javaÎļþ£¬²¢½«Æä¸´ÖƵ½ÏîÄ¿src ......