|
Posted by Jim Michaels on 11/21/92 11:37
AHA! I was wondering what all these new mysqli functions brought to the
table... I haven't completely gone over those functions yet.
this sounds like using SQL Server's dblib for doing embedded SQL.
and I'm glad to see the latest CHM manual acually has content for these
functions now (just upgraded my manual).
what type is a CLOB (couldn't find it in MySQL 5.0 manual)? an Oracle type?
BTW, what would drive the decision to choose between BLOB, LONGBLOB, and
BINARY? I know between BLOB and LONGBLOB it's data size. but I don't
know much about BINARY and its difference from BLOB. Isn't BLOB and
LONGBLOB just a type of BINARY, where BINARY is the internal representation
type?
"Hilarion" <hilarion@SPAM.op.SMIECI.pl> wrote in message
news:dqghi7$n65$1@news.onet.pl...
>> I've not seen this ("statements with value placeholders and provided
>> value binding functions") using the mysql functions in PHP before. what
>> does it look like?
>
>
> Check "mysqli" functions in PHP manual. As far as I know (I do not use
> MySQL) it uses "?" as a value placeholder. You first prepare the query,
> then bind the values to the placeholders (you do not have to - or rather
> you should not - escape the values in this case) and execute the
> statement. You can then rebind the values and execute the statement
> again with new values without doing the "prepare" part, which saves
> some time and/or resources. At the very ent you close the statement
> which releases the resources reserved when the query got prepared.
> The syntax of "mysqli" binding could be better (it could use named
> parameters and a better way of passing value types), but it sure is
> safer than dynamic queries.
> In case of Oracle all PHP functions for it were made to support
> parameters from the very start (in case of MySQL the parameters are
> supported for quite short time). Oracle uses named parameters (you
> bind values to parameters using parameter names, not parameter
> positions in query). In oracle you "parse" the statement instead of
> "prepare", and you "free" the statement instead of using "close".
> Sometimes you also have to free values (if they are of some complexe
> type like BLOB or CLOB).
>
>
> Hilarion
Navigation:
[Reply to this message]
|