
May 6th, 2008, 11:54 PM
|
|
Contributing User
|
|
Join Date: Oct 2006
Posts: 113
 
Time spent in forums: 2 Days 10 h 38 m 38 sec
Reputation Power: 2
|
|
|
Query giving error
PHP Code:
SELECT IF( c.user_id !=72, c.user_id, 0 ) owner_id, c.content_id, c.vprivate, c.transfer_id, c.category_id, c.system_file_name AS filename, c.content_name, c.status, c.sharable, ct.category_name, ct.private, (
SELECT sr.slam_room_id
FROM slam_round_users sru, slam_rounds sr
WHERE sr.round_status !=3
AND sr.slam_round_id = sru.slam_round_id
AND user_content_id = c.content_id
LIMIT 1
) AS enter_slam, (
SELECT stage_name
FROM users
WHERE user_id = uploader_id
) AS uploader_stage_name, uploader_id, (
SELECT count( * )
FROM user_grabs AS ug
WHERE ug.user_id =
AND ug.content_id = c.content_id
) AS grab_status
FROM user_content c, category ct
WHERE ct.category_id = c.category_id
AND (
(
transfer_status =0
AND c.user_id =72
)
OR content_id
IN (
SELECT DISTINCT content_id
FROM video_transfer_history
WHERE user_id =72
AND profile_view =1
AND bam_delete =0
)
)
AND c.status =1
AND vprivate =0
AND private =0
ORDER BY date_uploaded DESC
LIMIT 0 , 10
The query producing error like "#1064 - 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 ug.content_id = c.content_id
) AS grab_status
FROM user_content c, categor' at line 20 ".
i am not sure what is wrong.
|