My understanding is that you cannot pass keywords as parameters because
the RDBMS cannot confirm the validity of the statement and thus cannot
prepare it. As a matter of fact, it doesn't even know what the whole
statement will be with a bind variable in that position. 
 

Similarly keywords

On Mon, 2002-06-10 at 11:05, Hytham Shehab wrote:
>  hi all of u,
>      i got a simple question, why (1) is valid, however, (2) is not ?!!
>  (1) sorting order is explicity typed in the query statement:
>   $sth = $dbh->prepare("select student_name from students order by
> first_name
>  asc");
>  $sth->execute();
>  (2) sorting order is passed as a bind parameter:
>  $sort = 'asc';
>  $sth = $dbh->prepare("select student_name from students order by first_name
>  ?");
>  $sth->execute($sort);
> 
>  thx v. much
>  --
>  Hytham Shehab
> 


Reply via email to