On Sat, Feb 24, 2001 at 05:43:58PM +0100, Sven Voigt wrote:
> On Friday 23 February 2001 17:03, you wrote:
> > I suppose the authors never concieved a replacement parameter for select
> >
> > specification.
> >
> > try:
> > > $sql =3D "select foo, bar, rid from masterdata WHERE rid=3D:rid"
> >
> > You need to loose the colon ":" or place it to the right of a where cla
> > use.
>
> Sorry to bother this list again, but I don't get the point... :-(
>
> I need the rowid for later updates by a user form. So how can I issue a
> select clause with 'WHERE rid=3D:rid'? Don't I need this for the *update*
> clause???
rowids in 8i are an opaque data-type. so you need to convert
them to something human-readable 1st (btw the column is
called rowid and not rid).
select ROWIDTOCHAR(rowid), name from test;
ROWID NAME
------------------ --------------------------------
AAAGBFAAIAAAB/tAAA müller
update test set name = 'hallo' where ROWID ='AAAGBFAAIAAAB/tAAA';
>
> This is what I thought of:
> 1.) select foo, bar, rid from masterdata
> 2.) let user select data set to update with 'update.php?rowid=ROWID'
> 3.) write changes to database: update foo, bar values (FOO, BAR) where
> rowid=ROWID'
usually one uses his/her self-defined primary key for that
purpose.
>
> And what's about that colon? Is there any special meaning in PHP?
no - in oracle sql the colon indicate that you are using a
placeholder (= bind-variable);
>
> I'd highly appreciate your help/answer! Many thanks in advance
BTW i cannot reproduce the reported crash - could you please
try the latest snapshot from snaps.php.net and report if you
still see this crash?
thanx,
tc
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]