Welcome Guest, Not a member yet? Register   Sign In
Bookmarks
#3

[eluser]eggshape[/eluser]
Hi - Your request is a little ambiguous for me, but maybe this will help; this assumes your database field is called 'bookmarks':

@Sawariya: (btw, is that aishwarya rai?)
Code:
$sql = "UPDATE table_name SET bookmarks = ?";
$query = $this->db->query($sql, array($number)); //will update bookmarks with $number, set table_name to whatever name your table is

@Nagabhushana:
Code:
$sql = "SELECT COUNT(bookmarks) AS total FROM table_name"; // 'AS total' is an alias for the total number of bookmarks
$query = $this->db->get($sql);
$row = $query->row();
$total = $row->total;

In SQL statements, it's customary to UPPERCASE SQL syntax but it's not necessary.


Messages In This Thread
Bookmarks - by El Forum - 01-12-2008, 03:32 AM
Bookmarks - by El Forum - 01-12-2008, 05:43 AM
Bookmarks - by El Forum - 01-14-2008, 10:36 PM
Bookmarks - by El Forum - 01-22-2008, 11:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB