mysqlÄ£ºý²éѯÈçºÎ²éѯÁ½¸ö¹Ø¼ü×Ö
ÎÒÓõÄlikeÄ£ºý²éѯ£¬±ÈÈçmysqlµÄnameÖÐÓС°csdnÂÛ̳ϵͳ¡±Õ⼸¸ö×Ö£¬ÈçºÎÔÚ <input>Öвéѯ¡°csdn ϵͳ¡±Ò²ÄܳöÀ´Õâ¸ö¡°csdnÂÛ̳ϵͳ¡±£¬ÎÒÏÖÔÚÊDz顰csdn¡±»òÕß¡°ÏµÍ³¡±¶¼¿ÉÒÔ¡£Ð»Ð»¸÷λÁË£¡²»ÖªµÀÎÒÕâô±í´ï¸÷λÄܲ»ÄÜÃ÷°×£¡
name like 'csdn%' or name like '%ϵͳ' or name like 'csdn%ϵͳ'
ÕâÑùÐÔÄܺܵͣ¬µ«ÊÇÌôÒ»¸öÄãÏëÓõİɣ¡
Â¥ÉÏÕý½â£¬ºÇºÇ£¬²»¹ý£¬ÕâÑù¸Ð¾õÐÔÄÜÊDZȽϵ͵Ä
$str = "csdn ϵͳ";
$str = str_replace(" ","%",$str);
$sql = "select * from table where name like $str";
Ö§³ÖÒ»ÏÂһ¥µÄ
select * from yourTable where name like '%csdn%'
¶÷£¬Ö§³ÖÉÏÃæµÄ»Ø´ð¡£
{{
Ïà¹ØÎÊ´ð£º
ÎÒÔÚ×¢²áÒ³ÃæÐ´ÈëÁËÈçÏ´úÂ룺
<?php
$conn=mysql_connect("localhost","root","614510")or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Ó´íÎó".mysql_error());
& ......
ÎÒÒÔǰ°²×°ÁËÒ»´Î£¬ºóÀ´Ð¶ÔØÁË£¬ÏÖÔÚÔÙ°²×°µÄʱºò£¬Ìáʾ´íÎó£ºError 1305.Error reading from file C:DOCUME~1\LOCALS~1\Temp\mysql_server.msi.Verify that the file exists and that you can access it.
¿ ......
select * from table where '123456789' like '%'+×ֶαí+'%'
Õâ¾äsqlÔÚsqlserverÏÂͨ¹ý£¬ÔÚmysqlÏÂÓб¨´í£¬mysqlÏÂÈçºÎʵÏÖÕâÑùµÄ²éÑ¯ÄØ
SQL code:
select * from table whe ......
ÔõÑù°Ñmysql 4.0µÄ×Ö·û¼¯¸ÄΪgbk?
mysql 4.0µÄ×Ö·û¼¯¿ÉÒÔÑ¡gbkÂð?
ÔõÑù°Ñmysql 4.0µÄ×Ö·û¼¯¸ÄΪgbk?
------------------------------
ÔÚÅäÖÃÎļþÀïÃæ¿´¿´ÊÇ·ñ¿ÉÒÔÌí¼Ó£º
default-character-set=g ......