MySQL Errno : 1064 PHPCMS2008ÎÊÌâ
PHPCMSÆóÒµ»ÆÒ³2008·ÖÒ³ÎÊÌâ
ÎÒÓÃÒÔÏ·½Ê½Çóƽ¾ùÊý
{get sql="SELECT DISTINCT c.*,
(select round(avg(sort1)) from `phpcms_yp_dp` where userid=c.userid) avgsort1,
(select round(avg(avgprice)) from `phpcms_yp_dp` where userid=c.userid) avgprice
from `phpcms_member_company` `c`,`phpcms_yp_relation` `r`
WHERE c.userid = r.userid AND $where
ORDER BY avgprice DESC" rows="$pagesize" page="$page"
urlrule="$M[url]company.php?pagesize=$pagesize&listtype=$listtype&areaname=$areaname&catid=$catid|$M[url]company.php?pagesize=$pagesize&listtype=$listtype&areaname=$areaname&catid=$catid&page=\\$page"
distinctfield="\c.userid"}
½«³öÏÖÈçÏ´íÎó
MySQL Query : SELECT COUNT(distinct c.userid) AS `count` from `yehsow_yp_dp` where userid=c.userid) avgsort1, (select round(avg(avgprice)) from `yehsow_yp_dp` where userid=c.userid) avgprice from `yehsow_member_company` `c`,`yehsow_yp_relation` `r` WHERE c.userid = r.userid AND c.status = '1' ORDER BY avgprice DESC
MySQL Error : 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 ') avgsort1, (select round(avg(avgprice)) from `yehsow_yp_dp` where userid=c.us' at line 1
MySQL Errno : 1064
Message : MySQL Query Error
µ±ÎÒ°Ñ·ÖÒ³page="$page"ɾ³ýû´
Ïà¹ØÎÊ´ð£º
±àÒëÆ÷£ºC-Free4
mysql µ¥¶À°²×°µÄ£¬ÏÖÔÚΪapache+php+mysql¿ÉÒÔʹÓá£
×î½üÔÚÁ·Ï°c£¬c++£»ÏëÓÃc£¬c++Á¬½ÓÏÂÎÒµÄmysql£¬ºÃ¶àµØ·½¶à˵mysql.hÕÒ²»µ½¡£¶øÇÒÎÒmysqlûÓÐËùνµÄincludeÎļþ¼Ð°¡¡£
Íü¸ßÊÖÖ¸µãÒ»¶ ......
ÎÒµÄMysql ʹÓõÄʱºò ÓÃdos½¨Á¢µÄÊý¾Ý±í ÔÚdosÖÐÄÜÏÔʾ³öÖÐÎÄ
µ«ÊÇÔÚ ÆäËûµÄ¿ÉÊÓÒ³Ãæ ºÍÍøÒ³Öж¼ÏÔʾÂÒÂë ÈçºÎ½â¾ö£¿
ÔÚmysql¿ØÖÆ̨:show variables like 'char%';Ìù½á¹û³öÀ´¿´¿´¡£
mysqlÃüÁîÐÐģʽÏÂ: ......
echo %~dp0
CD %~dp0
mysqld.exe --defaults-file=..\my.ini --console
pause
´ó¼Ò¿´¿´ÒÔÉÏbatÎļþµÄÒâ˼£¬Çë´óÏÀ¸ø¸öÏêϸµÄ½âÊÍ°¡¡£
ÕâÊÇÆô¶¯mysql·þÎñ°¡¡£
echo %~dp0
ÏÔʾµ±Ç°batËùÔÚĿ¼Ãû
CD %~dp0
......
ÎÒÔÚÇåÀímysqlµÄʱºò£¬Ò»²»ÁôÉñ½«mysql(¼´dataÀïµÄmysqlÎļþ¼Ð)Êý¾Ý¿â¸øɾµôÁË£¬¸ôÁ˼¸¸öСʱÎÒÖØÆôÁËmysqlÈí¼þ£¬mysql¾Í×Ô¶¯³õʼ»¯ÁËÊý¾Ý¿â£¬µ¼Ö´Óɾ³ýmysqlÎļþ¼Ð¿ªÊ¼µ½ÖØÆôÕâ¶Îʱ¼äµÄÊý¾Ý¶ªÊ§£¬ÄÇλ¸ßÊÖ°ïÏëÏë°ì ......
String SQL="insert into ѧÉúÐÅÏ¢±í values(StudentNumber,StudentName,StudentAge)";ÆäÖÐStudentNumber,StudentName,StudentAge¶¼ÊDZäÁ¿¡£ÕâÑùд²»¶Ô¡¡µ½µ×¸Ãզд°¡
Íò·Ö¸Ðл£¡
String SQL=&q ......