I have a problem with a decision....
i want to give the user the opportunity to update his profile...
so how do i get around this the smartest way ?
i know how to, but not what the most effective way would be like...
i thought about
putting all in a function and running it via switch case
or maybe for each item a function
or update everything at once
[edited img=https://media.giphy.com/media/YsTs5ltWtEhnq/giphy.gif]
like :
Exmp 1
func upic1($id) {
sql do your magic thing !
}
func upic2($id) {
sql you holy wizard !
}
func upic3($id) {
sql trickshot !
}
Exmp 2
func uallpics($stmt,$id) {
Switch $stmt {
case upic1
sql do your magic thing !
case upic2
sql you holy wizard !
case upic3
sql trickshot !
default
sql overload !!
}
}
Exmp 3
func uallpic($id){
sql overload !!
}