Simple question...
I have a query from a database that pulls about 14 fields from a table with $row = mysql_fetch_array($res);
I have a bunch of functions that use this info.
What would it be better?
1) To pass the whole $row array to every function even though they will only use less than half of the array:
recordExists($row);
or
2) Pass to the function only the data that it will use:
recordExists($row['id'], $row['name'], $row['date'], $['time'], $row['apt_id']);
It might sound trivial, but I have at least 4 functions that would work this way and they get called at least 1,000 times each... so in the end, doing it in the more effective way would increase the performance of my script (I'm guessing, I don't know)
Any ideas?