Hey friends, Please help me. Tell me how can i optimize my sql script through memcached?
$sql = "SELECT * FROM table";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query))
{
echo "$row[1] - $row[2]"."<br/>";
}
How can i integrate memcached in this type of coding? I am new to memcached and it's making me crazy. Unable to sorting it out. Please guys help me out.
Is it like
$m = new Memcache;
$m->connect("localhost");
$sql = "SELECT * FROM table";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query))
{
$m->set("data","$row[1]);
$a = $m->get("data");
echo "$row[1] - $row[2]"."<br/>";
}
???????????
Please help me. Thanks