From: niekt0 Date: Mon, 20 Jun 2011 14:11:06 +0000 (+0200) Subject: getUserSubmission_children fix2 X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=2341aefae4213c68c6d7f925680002382ae94a45;p=mirrors%2FKyberia-bloodline.git getUserSubmission_children fix2 --- diff --git a/wwwroot/backend/mysql/backend.inc b/wwwroot/backend/mysql/backend.inc index 8b21936..55eafab 100644 --- a/wwwroot/backend/mysql/backend.inc +++ b/wwwroot/backend/mysql/backend.inc @@ -288,10 +288,10 @@ public static function GetUserSubmissionsChildren($user_id,$limit=23,$offset=0,$ // XXX orderby mysql escape - $q = "select n1.* from nodes as n1 join + $q = "select child.*, from nodes as child join (select node_id,node_creator from nodes where node_creator='$user_id') - as j2 on n1.node_parent=j2.node_id - join users as j3 on j3.user_id=n1.node_creator order by node_created + as j2 on child.node_parent=j2.node_id and child.node_creator <> '$user_id' + join users as j3 on j3.user_id=child.node_creator order by node_created desc $orderby LIMIT $offset,$limit"; // $q="select users.*,nodes.* from nodes