mysqli bind_param made automatically

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

mysqli bind_param made automatically

Post by jmut »

hi,

Anybody know how could I automatically bind_params when using mysqli.

So after I prepare methods I don't have to supply field_types and execute directly.
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post by jmut »

I came up to an interesting solution.
I will check the type of the values that comes in and that is how I will determine column_types to use for bind_param.
Althought not the exactly correct approach I think it will do.

One problem though. Do you know if I could determine if the incomind data is blob.
i corresponding variable has type integer
d corresponding variable has type double
s corresponding variable has type string
b corresponding variable is a blob and will be send in packets
These are the types I should catch according to.
http://bg.php.net/manual/en/function.my ... -param.php

Thanks alot for spending time.
Cheers
Post Reply