Welcome Guest, Not a member yet? Register   Sign In
Customer model design question
#1

[eluser]blasto333[/eluser]
I have a Customer model in a program I am building.

A customer has the following fields in the database table.

first_name, last_name, phone_number, email, street_address, state, zip, comments (and possible more)

In my Model I have a function to save (insert or update) a customer.

Code:
function save_customer($customer_id, $first_name, $last_name, $phone_number, $email, $street_address, $state, $zip, $comments)


As you can tell the function has a LOT of parameters. Is this considered a bad practice? Should I just have one array that contains field=>value references? What do you do?


Messages In This Thread
Customer model design question - by El Forum - 10-16-2008, 11:48 AM
Customer model design question - by El Forum - 10-16-2008, 12:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB