xenogfx
New Member
- Oct 24, 2011
- 24
- 12
Want to select and update any one column and any one table? Well here is how you do it
PHP:
<?php
/**
* @Author Deformed aka XenoGFX
* @Copyright 2012
* @Description Simple server UPDATE and SELECT query functions..
*/
// Update Query
function mSU($table,$column,$value,$condition,$limit)
{
mysql_query("UPDATE $table SET $column = '$value' WHERE $condition LIMIT $limit;");
}
// Select Query
function mSS($table,$select,$condition,$limit)
{
return mysql_query("SELECT $select FROM $table WHERE $condition LIMIT $limit;");
}
// Update Query
mSU("users","online","0","username = 'howdy'","1");
// Select Query
mSS("users","id","username LIKE '%boobface%'","5");
?>