Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÇóÖú!!mysqlÊý¾Ý¿â²éѯÎÊÌâ - PHP / »ù´¡±à³Ì

ÕâÊÇÎÒµÄÒ»¶Î´úÂë:
<?php

$store_poster=$_POST['poster'];
$store_title=$_POST['title'];
$store_message=$_POST['message'];
$store_parent=$_POST['parent'];£¨parent ÊǸöÊý×Ö£¬ÆäËüµÄ¶¼ÊÇ×Ö·û´®£©

//check not a duplicate
$conn=mysql_connect('localhost','root','lvliangwei');

mysql_select_db('lvyou', $conn) or die ('Can\'t use lvyou : ' . mysql_error());

$query="select header.postid from header ,body where 
header.postid=body.postid and 
header.parent=".$store_parent." and
header.poster='".$store_poster."' and
header.title='".$store_title."' and
body.message='".$store_message."'";

$result=mysql_query($query)or die("invalid query: " . mysql_error());

if(!$result){return false;}

$num_rows=mysql_num_rows($result);

ÔÚä¯ÀÀÆ÷ÖÐÔËÐÐʱ³öÏÖÈëÏÂÌáʾ£º


invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server 

version for the right syntax to use near 'and header.poster= and header.title= and body.message='


ÕâÊÇÔõô»ØÊ ÎÒµÄ$queryÓï¾ä¸³ÖµÓдíô£¿








$store_poster $store_title $store_message ¶¼ÊÇ¿Õ
Äã°ÑÄÇЩֵ給ÉÏ

addslashes

Óï¾äÊÇûÓÐÎÊÌ⣬Ӧ¸ÃÊÇÄã²åÈëµÄÖµµÄÎÊÌâ¡£¿ÉÄÜÊÇûÓн«


Ïà¹ØÎÊ´ð£º

php »ñÈ¡Ò³ÃæÄÚÈÝ - PHP / »ù´¡±à³Ì

Ôڲɼ¯Ò»¸öÒ³ÃæµÄʱºòͨ³£¶¼ÊÇʹÓÃfile_get_contents($url)
²»¹ý·µ»ØµÄ½á¹ûÓÐʱºò»á²»È«
Èç¹ûÔÚhtmlÖÐʹÓà document.ready,ÔÚÒ³Ãæ×¼±¸ºÃºó£¬Ê¹ÓÃajax¶ÁÈ¡±ðÒ»²¿·ÖµÄÊý¾Ý
ÔÙͨ¹ýÐÞ¸Ähtml±êÇ©µÄÄÚÈÝ£¬¾Í²¿·ÖµÄÊý¾Ý¾ ......

±±¾©2ÄêPHP¾­ÑéÇó¼æÖ° - PHP / Framework

±±¾©2ÄêPHP¾­ÑéÇó¼æÖ°
½Ó·Ö

·¹ý½Ó·Ö£¡.¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£

jf~~~~~~~~~~~~~~Ö§³Ö

ßÀ¡£¡£ÎÒÃÇÐèÒª¼æÖ°£¬¿ÉÊÇÔõôÁªÏµÄãѽ£¿

¶¥¡£¡£¡£ »Ø¸´ÄÚÈÝ »Ø¸´ÄÚÈÝÌ«¶ÌÁË£¡

º¼ÖÝÄãÈ¥²»È¥°¡ ¡£¡£¡£¡£¡ ......

PHPÈçºÎÉèÖÃÒ³Ãæ»º´æ1ÐÇÆÚ - PHP / »ù´¡±à³Ì

ÈçÌ⣬Ôõôд¸öheadÍ·²¿ ÈÃÒ³Ãæ»º´æ1ÐÇÆÚ¡£
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Äã°ÑÀïÃæµÄʱ¼ä£¬¸Ä³Éµ±Ç°Ê±¼ä¼ÓÉÏÒ»¸öÐÇÆÚ
¼ÇµÃҪת»»³Égmtʱ¼ä

ÎÒÕâÑùдµÄ ²»ÖªµÀÐв»ÐС£
Ò»¸öÐ ......

phpÎļþµ÷ÓÃjsÎļþÀïµÄ·½·¨£¿ - PHP / »ù´¡±à³Ì

¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
»òÕßÔÚjsÎļþÀïµ÷ÓÃphpÎļþдµÄseesion£¿
PHP¸ÕÈëÃÅѧϰ,ÓÑÇé¶¥Ò»¸ö


¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
//echo '<script>alert("ok");< ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ