Welcome Guest, Not a member yet? Register   Sign In
SOLVED: Database help
#1

[eluser]rvillalon[/eluser]
How would I transform this:

$sql = "SELECT message, date_created, username
FROM shoutbox s, users p
WHERE p.id = s.uid
ORDER BY s.date_created DESC";
$query = $this->db->query($sql);

into a format like this:

$this->db->where("did", $did);
$this->db->limit(10, 0);
$this->db->order_by("date_created", "desc");
$this->db->from(self::TBL_SHOUTBOX);
$result = $this->db->get();


Messages In This Thread
SOLVED: Database help - by El Forum - 08-26-2009, 07:18 AM
SOLVED: Database help - by El Forum - 08-26-2009, 07:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB