Re: new problem... problem with Query...

From: Date: Tue, 20 Nov 2001 01:30:19 +0000
Subject: Re: new problem... problem with Query...
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-10527@lists.php.net to get a copy of this message
Both don't work... same problem... I cannot figure it out "Olivier Hubert" <raggart@colvir.net> wrote in message news:5.0.2.1.0.20011119175118.00a8ec98@colvir.net... > Hi, > > If you mysql connection is the only one you're trying to maintain, > I suggest you try > > $result = @mysql_query($sql) or die ("Couldn't execute > query."); > > e.g. without passing the $connection parameter. Also, try using mysql_error > to get the actual error message. > > HTH! > > Olivier > > At 16:30 2001-11-19 -0600, Todd Williamsen wrote: > >Here it is.... I get the error "cannot execute query" so there is > >something wrong with the SQL and I cannot figure it out... > > > ><? > > > >if ((!$FirstName) || (!$LastName)) { > > header("Location: http://www.feminineforum.com/admin/pick_modcontact.php"); > > exit; > > > >} else { > > > > session_start(); > > > >} > > > >if ($valid != "yes") { > > header("Location: http://www.feminineforum.com/admin/contact_menu.php"); > > exit; > > > >} else { > > > > session_register('valid'); > > > >} > > > > > >$db_name = "feminineforum"; > >$table_name = "tblmembers"; > > > >$connection = @mysql_connect ("localhost", "feminine", > >"krmc33") or die > >("Couldn't connect."); > > > >$db = @mysql_select_db ($db_name, $connection) or die("Couldn't select > >database."); > > > >$sql = "UPDATE $table_name > > SET > > FirstName = \"$FirstName\", > > LastName = \"$LastName\", > > Address1 = \"$Address1\", > > Address2 = \"$Address2\", > > City = \"$City\", > > State = \"$State\", > > Zip = \"$Zip\", > > HomePhone = \"$HomePhone\", > > WorkPhone = \"$WorkPhone\", > > Fax = \"$Fax\", > > Email = \"$Email\", > > UserId = \"$UserId\", > > Password = \"$Password\", > > WHERE id = \"$ID\" > >"; > > > >$result = @mysql_query($sql, $connection) or die ("Couldn't execute > >query."); > > > > > > > >-- > >PHP Windows Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > >For additional commands, e-mail: php-windows-help@lists.php.net > >To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.windows (#10527) next »