View Single Post
  #49  
Old 29th August 2016, 08:42
fireknight's Avatar
fireknight fireknight is offline
Administrator
 
Join Date: Aug 2010
Australia
Posts: 173
Default
Quote:
Originally Posted by Napon View Post
what function for sql_query ? im nealy there lol with this one step then done
There are only 2 steps to do.
It's not that hard.

OK a quick and basic lesson in functions.

You want to replace mysql_query with sql_query.

Example of a mysql_query
Code:
mysql_query("SELECT username FROM users WHERE id = 1");
See how mysql_query has 2 brackets and ends with a semi colan.
That is a function, same as the example below

Code:
parked();
The only differance is - the mysql_query("********");
Is reconised by php as a pre set standard function.

Where parked(); has to be defined as a function with-in the source code.

So to replace mysql_query with sql_query.
You will need to create a function for sql_query.

Example ( DO NOT COPY AND PASTE )
Code:
function sql_query()
{
    $result = mysql_query();

    return $result;
}
You should be able to figure it out from the above example.
After all you do write your own custom code all the time.
Which I am sure includes lots of custom functions.
Reply With Quote