This topic is locked
[SOLVED]

 Order By Posted Desc

1/10/2013 7:48:08 PM
PHPRunner General questions
L
lkh11lkh author

dear all
how do i place this code=> order by Posted desc <= inside below
$str2 = "select count(Users) as numbers2, Posted from ".$dal_table->TableName()." where Users='".$data["Users"]."' group by Posted";
please advise with thanks

C
cgphp 1/12/2013
global $strTableName;

$str2 = "SELECT count(Users) as numbers2, Posted FROM ".$strTableName." WHERE Users='".$data["Users"]."' ORDER BY Posted DESC GROUP BY Posted";

$rs = CustomQuery($str2); //the query result is in $rs
L
lkh11lkh author 1/15/2013


global $strTableName;

$str2 = "SELECT count(Users) as numbers2, Posted FROM ".$strTableName." WHERE Users='".$data["Users"]."' ORDER BY Posted DESC GROUP BY Posted";

$rs = CustomQuery($str2); //the query result is in $rs




thanks cristian