原帖由 84026763 于 2006年6月16日 07:25 PM 发表
Discuz! info: MySQL Query Error
User: admin
Time: 2006-6-16 7:22pm
Script: /plugin.php
SQL: SELECT u.* , m.username,i.imagename,i.endurance as dates,i.cost FROM cdb_images_user u ,cdb_image ...
MySQL + PHP 新版的问题
virtualimages/images_user.php
找
- $imagesquery = $db->query("SELECT u.* , m.username,i.imagename,i.endurance as dates FROM $tablepre"."images_user u ,$tablepre"."images_data i LEFT JOIN $tablepre"."members m ON m.uid = u.imagefrom WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '1' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
更换
- $imagesquery = $db->query("SELECT u.*, m.username,i.imagename, i.endurance as dates FROM ($tablepre"."images_user u, $tablepre"."images_data i) LEFT JOIN $tablepre"."members m ON (m.uid = u.imagefrom) WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '1' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
再找
- $imagesquery = $db->query("SELECT u.* , m.username,i.imagename,i.endurance as dates FROM $tablepre"."images_user u ,$tablepre"."images_data i LEFT JOIN $tablepre"."members m ON m.uid = u.imagefrom WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '0' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
更换
- $imagesquery = $db->query("SELECT u.*, m.username,i.imagename, i.endurance as dates FROM ($tablepre"."images_user u, $tablepre"."images_data i) LEFT JOIN $tablepre"."members m ON (m.uid = u.imagefrom) WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '0' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
virtualimages/images_bad.php
找
- $imagesquery = $db->query("SELECT u.* , m.username,i.imagename,i.endurance as dates,i.cost FROM $tablepre"."images_user u ,$tablepre"."images_data i LEFT JOIN $tablepre"."members m ON m.uid = u.imagefrom WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '3' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
更换
- $imagesquery = $db->query("SELECT u.*, m.username,i.imagename,i.endurance as dates,i.cost FROM ($tablepre"."images_user u ,$tablepre"."images_data i) LEFT JOIN $tablepre"."members m ON (m.uid = u.imagefrom) WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '3' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
~完成~ |