Re: DB autoPrepare: can you use a variable to determine if you use DB_AUTOQUERY_UPDATE or DB_AUTOQUERY_INSERT ?

From: Date: Tue, 16 Aug 2005 15:05:11 +0000
Subject: Re: DB autoPrepare: can you use a variable to determine if you use DB_AUTOQUERY_UPDATE or DB_AUTOQUERY_INSERT ?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20430@lists.php.net to get a copy of this message
l Burnerheimerton wrote:
Below is the basic code I'll be using. Depending on the user action, it will either be an INSERT or UPDATE. ANd depedning on what rights the user has, it will determine what fields that user can use. I want to cut down on code so I have tried to parameterize all the fields I can. When I try to use DB_AUTOQUERY_UPDATE in parameter form, it does not work. The fieldlist below has been left out on purpose.
You should use something like this: $how = DB_AUTOQUERY_UPDATE; e.g. *without* quotes. Otherwise you get strings instead of constants' vaules! -- Massimiliano Arione :: http://garak.it :: * No Word * http://gnu.org/philosophy/no-word-attachments.html * No HTML * http://efn.no/html-bad.html

« previous php.pear.general (#20430) next »