Saturday, 24 August 2013

Can I call a function inside mysql query?

Can I call a function inside mysql query?

can I call a function inside an MySQL Query? To ask more elaborately
consider I have a function which returns the account_id of the customer
int return_account_id(){
return (account_id);
}
Now can I call this function inside my query ? Is it possible ?
`resultset = statement->executeQuery("SELECT `account_id`, `acc_name` FROM
`account` WHERE `account_id` = "return_account_id()" ");

No comments:

Post a Comment