Jump to content

user defined functions

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
akashdeep

akashdeep

    Newbie

  • Members
  • Pip
  • 1 posts
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

#2
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
um, something like:

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