dear all,
I want to create a user defined function which is use for data fetch from a table which is designed in mysql database.when the function call from any page with the parameter table name,fiend names and condition it will return a dataset.can anyone help me out to create the function code........
regards,
akashdeep
user defined functions
Started by akashdeep, Jan 22 2010 04:41 AM
1 reply to this topic
#1
Posted 22 January 2010 - 04:41 AM
|
|
|
#2
Posted 22 January 2010 - 08:24 AM
um, something like:
for me, that function seem pretty unuseful... you normally wanna write the queries directly, it gives you more control.
function select ($table, $fieldlist, $condition) {
return mysql_query("SELECT ".$fieldlist." FROM ".$table." WHERE ".$condition");
}
for me, that function seem pretty unuseful... you normally wanna write the queries directly, it gives you more control.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall


Sign In
Create Account

Back to top









