On Wednesday 10 April 2002 12:32, jas wrote:
> Ok here is my question... I have a form that reads the contents of a
> directory, places the resulting files into a select box within a form for
> further processing, code is as follows:
[snip]
> What I need to know is if there is a way to create an if statement that
> would either update or not update a selected field in the database. Below
> is a piece I would assume would work however I am not sure of the mysql
> command to not update anything. Any help would be great.
> Jas
>
> if( $file_name = '----------' ) $sql = "dont update table";
> else $sql = "UPDATE $table_name SET image01_t = \"$files\"";
Am I missing something? Psuedo-code:
if ($file_name != '----------') {
$sql = "UPDATE ....";
$result = $mysql_query($sql);
etc;
etc; }
else {
don't even need an else!
}
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
The sun never sets on those who ride into it.
-- RKO
*/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php