php Á´½Ó mysql ºÜÄÕÈ˵ÄÎÊÌâ - PHP / »ù´¡±à³Ì
¶¼ÊÇÔÚ±¾µØ°²×°µÄphpºÍmysql»¹ÓÐapache£¬¶¼ÊÇ×îÐÂÎȶ¨°æ¡£
php_mysql.dllºÍlibmysql.dllÎļþ¿½±´ÖÁc:winntsystem32ÖÐ
php.iniÖеÄ;extension=php_mysql,È¥µôÇ°ÃæµÄ";"¡¡
pathÖмÓÈëÁËphpµÄ·¾¶»¹ÓÐphp\extµÄ·¾¶
ÖØÆôÎÞÊý´Î·þÎñÆ÷
µ«ÊÇphpinfo²»³öÀ´mysqlµÄext
ËùÒÔºÜÄÕÈË£¬²»ÖªµÀÄÄÀﻹҪÅäÖá£
ÓÃxamppÕâ¸öÈí¼þÊÔÒ»ÏÂ
php.iniµÄλÖÃÄØ£¿
ÔÚphpinfoÀï¿´php.iniÉúЧµÄλÖÃÊÇÄÄÀï
{{--
Ïà¹ØÎÊ´ð£º
×î½üÒ»¸öÏîÄ¿ÖÐÓöµ½Ò»¸öÎÊÌ⣺ÔÚÔÓеÄÒ»Ì×ϵͳÖÐ(php¿ª·¢)Ìí¼ÓһЩС¹¦ÄÜ(jsp¿ª·¢)£¬ÔÀ´Óû§ÏµÍ³¶¼ÊÇphp¿ª·¢µÄ£¬ÎÒÈçºÎÔÚjsp¿ª·¢µÄ¹¦ÄÜÖÐ×öµ½Óû§ÐÅÏ¢sessionͬ²½ÄØ£¿ ÓÐÈËÊÇ·ñÓÐ×ö¹ýÀàÒÔÏîÄ¿£¬ÏëÌýÌý´ó¼ÒµÄ¿´·¨
......
mssql_select_db("f1",mssql_connect("localhost","sa","sa"));
mssql_select_db("f2",mssql_connect("192.168.0.1","sa","sa") ......
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Çý¶¯³ÌÐò¹ÜÀíÆ÷] δ·¢ÏÖÊý¾ÝÔ´Ãû³Æ²¢ÇÒδָ¶¨Ä¬ÈÏÇý¶¯³ÌÐò, SQL state IM002 in SQLConnect in D:\0\msc\msc\tel.php on line 44
Í ......
PHPÖÐ ÉùÃ÷±äÁ¿µÄʱºòÒ»¸ö$¸úÁ½¸ö$µÄÇø±ð
±ÈÈç˵
$var="333"; ±íʾ±äÁ¿ÃûΪ$varµÄ±äÁ¿µÄֵΪ333
$var="myvar";$$var="333";±íʾ±äÁ¿ÃûΪ$myvarµÄ±äÁ¿µÄֵΪ333
ÕâÑù˵Çå³þÁËÂð£¿
......
id name datetime
1 a 2010-05-13 10:15:00
2 b 2010-05-14 09:10:00
3 d 2010-05-14 10:10:00
ÈçºÎ½«¾àÀëĿǰ×î½üµÄÄǸö¼Ç¼µÄname ¸üÐÂΪ¡°x¡±ÄØ
лл¿© °¡ ºÇºÇ
update table_n ......