Code: Select all
$result = mysql_query("SELECT * FROM loginphp WHERE Uname='{$_SESSION[Uname]}'") or die(mysql_error());
$row = mysql_fetch_array( $result );Code: Select all
$result = mysql_query("SELECT * FROM friends WHERE global_id='$_GET[id]' AND friend_global_id='$global_id'") or die(mysql_error());
$num_rows = mysql_num_rows($result);I mean there are all kinds of querys on tables such as friends, loginphp, profile_photo, wall, education, general and having to constantly add in the query is annoying, I would like to have a master file of my database query's and be able to call the one I want when I want it to reduce lines of code in my files, and eliminate the need for me to type in the query's over and over.
Thanks
-Steve