phpÖÐsqlÓï¾äµÄÒýºÅÏê½â
Õâ¾ÍÒª´ÓË«ÒýºÅºÍµ¥ÒýºÅµÄ×÷Óý²Æð£º
Ë«ÒýºÅÀïÃæµÄ×ֶλᾹý±àÒëÆ÷½âÊÍÈ»ºóÔÙµ±×÷HTML´úÂëÊä³ö£¬µ«Êǵ¥ÒýºÅÀïÃæµÄ²»ÐèÒª½âÊÍ£¬Ö±½ÓÊä³ö¡£ÀýÈ磺
$abc='I love u';
echo $abc //½á¹ûÊÇ:I love u
echo '$abc' //½á¹ûÊÇ:$abc
echo "$abc" //½á¹ûÊÇ:I love u
ËùÒÔÔÚ¶ÔÊý¾Ý¿âÀïÃæµÄSQLÓï¾ä¸³ÖµµÄʱºòÒ²ÒªÓÃÔÚË«ÒýºÅÀïÃæSQL="select a,b,c from ..."
µ«ÊÇSQLÓï¾äÖлáÓе¥ÒýºÅ°Ñ×Ö¶ÎÃûÒý³öÀ´
ÀýÈç:select * from table where user='abc';
ÕâÀïµÄSQLÓï¾ä¿ÉÒÔÖ±½Óд³ÉSQL="select * from table where user='abc'"
µ«ÊÇÈç¹ûÏóÏÂÃ棺
$user='abc';
SQL1="select * from table where user=' ".$user." ' ";¶Ô±ÈÒ»ÏÂ
SQL2="select * from table where user=' abc ' "
ÎҰѵ¥ÒýºÅºÍË«ÒýºÅÖ®¼ä¶à¼ÓÁ˵ã¿Õ¸ñ£¬Ï£ÍûÄãÄÜ¿´µÄÇå³þÒ»µã¡£
Ò²¾ÍÊÇ°Ñ'abc' Ì滻Ϊ '".$user."'¶¼ÊÇÔÚÒ»¸öµ¥ÒýºÅÀïÃæµÄ¡£Ö»ÊÇ°ÑÕû¸öSQL×Ö·û´®·Ö¸îÁË¡£
SQL1¿ÉÒÔ·Ö½âΪÒÔÏÂ3¸ö²¿·Ö
1£º"select * from table where user=' "
2£º$user
3£º" ' "
×Ö·û´®Ö®¼äÓà . À´Á¬½Ó£¬ÕâÑùÄÜÃ÷°×ÁË°É¡£
Ïà¹ØÎĵµ£º
»¨ÁËÁ½¸öÍíÉÏ°ïÅóÓѽ«Ò»¸öasp¿ª·¢µÄÍøÕ¾´ÓACCESSÊý¾Ý¿âתÏòSQL SERVER 2000. ÍøÉϲéÁËЩ×ÊÁÏ£¬¼ÓÉÏ×Ô¼ºµÄ¾Àú£¬×ܽ᣺
1¡¢Ê×ÏÈ¿´asp µÄ³ÌÐòÖÐÊÇ·ñÓÐ on error resume next; Èç¹ûÓÐ,ÏÈ×¢Ê͵ô¡£·ñÔòºÜ¶à´íÎóÎÞ·¨±©Â¶³öÀ´
2¡¢´´½¨SQL SERVER Êý¾Ý±í¡£ ʹÓÃSQL SERVER 2000×Ô´øµÄÊý¾Ýµ¼ÈëÏòµ¼£¬½«ACCESSÊý¾Ý¿âÖеıí½á¹¹£¬ÒÔ¼ ......
1¡¢·Ö±ð°²×°Èý¸ö»·¾³£¬²¢ÉèÖò»Í¬¶Ë¿Ú
PHP:80
JSP:8080
ASP:8081
2¡¢ÉèÖÃ/Apache2/conf/httpd.conf
È¥µôÒÔÏÂÈýÐÐÇ°µÄ×¢ÊÍ£º
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
¼ÓÈëÒÔϼ¸ÐУº ......
ת×ÔCSDNÂÛ̳£ºchaihuoniu
ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
1¡¢ËµÃ÷£º´´½¨Êý¾ ......
Ó¦Óû·¾³¾ÍÊdzÌÐòÔÚÁ½¸öµØµãÔËÐеģ¬Á½±ß¶¼Òª²Ù×÷ÐÞ¸ÄÊý¾Ý£¬Á½µØͨ¹ý²¦ºÅÁ¬½Ó£¬ÊÇÓÃsql2000·½±ã£¬»¹ÊÇ2005·½±ã£¬ÓÃ2̨»úÆ÷¾Í¿ÉÒÔ»¹ÊÇ3̨»úÆ÷£¬Óô¥·¢Æ÷»¹ÊDZðµÄ·½·¨ÊµÏÖ£¿SQL codeÒÔÏÂʵÏÖ¸´ÖƲ½Ö裨ÒÔ¿ìÕÕ¸´ÖÆΪÀý£©
ÔËÐÐƽ̨SQL SERVER 2005
Ò»¡¢×¼±¸¹¤×÷£º
1£®½¨Á¢Ò»¸ö WINDOWS Óû§£¬ÉèÖÃΪ¹ÜÀíԱȨÏÞ£¬²¢ÉèÖÃÃÜ ......
sqlÓïÑÔÖÐÓÐûÓÐÀàËÆCÓïÑÔÖеÄswitch caseµÄÓï¾ä£¿£¿
ûÓÐ,ÓÃcase when À´´úÌæ¾ÍÐÐÁË.
ÀýÈç,ÏÂÃæµÄÓï¾äÏÔʾÖÐÎÄÄêÔÂ
select getdate() as ÈÕÆÚ,case month(get ......