<html> <head> <title>Search & View VIDEO</title> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> </head> <body> <?php error_reporting(E_ALL & ~E_NOTICE); ?> <form name="frmSearch" method="get" action="<?=$_SERVER["SCRIPT_NAME"];?>"> <table width="954" border="1"> <tr> <th><p>Keywords : <input name="txtKeyword" type="text" id="txtKeyword" value="<?=$_GET["txtKeyword"];?>"> 2012-05-29 หรือ "สุเทพ" </p> <p> <input type="submit" value="Search"> </p></th> </tr> </table> </form> <?php if($_GET["txtKeyword"] != "") { $objConnect = mysql_connect("localhost","root","") or die("Error Connect to Database"); $objDB = mysql_select_db("storage"); mysql_query("SET NAMES UTF8"); $strSQL = "SELECT * FROM datevdo WHERE (namelist LIKE '%".$_GET["txtKeyword"]."%' or date LIKE '%".$_GET["txtKeyword"]."%' )"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); ?> <table width="954" border="1" bordercolor="#F0F0F0" bgcolor="#FFCC99"> <tr> <th width="66"> <div align="center">ฮาร์ดดิส</div></th> <th width="167"> <div align="center">รายการ </div></th> <th width="83"> <div align="center">วันที่ </div></th> <th width="50"> <div align="center">ตอน</div></th> <th width="60"> <div align="center">MP4</div></th> <th width="60">Other </th> <th width="61">All Size</th> <th width="150">Address</th> <th width="199"> <div align="center">Description</div></th> </tr> <?php while($objResult = mysql_fetch_array($objQuery)) { ?> <tr> <td align="center"><?=$objResult["hdd_no"];?></div></td> <td align="left"><?=$objResult["namelist"];?></td> <td align="left"><?=$objResult["date"];?></td> <td align="center"><?=$objResult["ep"];?></div></td> <td align="center"><?=$objResult["mp4size"];?></td> <td align="center"><?=$objResult["othersize"];?></td> <td align="center"><?=$objResult["allsize"];?></td> <td align="left"><?=$objResult["address"];?></td> <td align="left"><?=$objResult["description"];?></td> </tr> <?php } ?> </table> <?php mysql_close($objConnect); } ?> </body> </html>
SELECT * FROM datevdo WHERE (namelist LIKE '%".$_GET["txtKeyword"]."%' or date LIKE '%".$_GET["txtKeyword"]."%' )
ALTER TABLE `datevdo` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
ALTER TABLE `datevdo` CHANGE `namelist` `namelist` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
Quote:Illegal mix of collations for operation 'like'
SELECT * FROM datevdo WHERE ( namelist LIKE '%ส%' OR `date` LIKE '%2013-%' )
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง