Re: dynamic variables in sq?l

From: Date: Fri, 25 Jan 2002 19:08:12 +0000
Subject: Re: dynamic variables in sq?l
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-82145@lists.php.net to get a copy of this message
mysql table is set up like this: ------------------------------------------ bmw | ford | mercedes | ------------------------------------------ 100 | 50 | 120 | It is just a very simple one. ----- Original Message ----- From: "Jeff Sheltren" <sheltren@home.com> To: "Raymond Lilleodegard" <raymol@online.no>; <php-general@lists.php.net> Sent: Friday, January 25, 2002 8:00 PM Subject: Re: [PHP] dynamic variables in sq?l > Can you show how your mysql table is set up? Otherwise I am not quite sure > what you are trying to do with your SQL statement. > > Jeff > > > And then I am trying to get the price out of a table in my database with > > this code: > > > > > > $sql = mysql_query("SELECT '$car' FROM varetabell where > > carid='$carid' "); > > $myrow= mysql_fetch_array($sql); > > $x = $myrow["$car"]; > > > > $price = $x * $number; > > > > >

« previous php.general (#82145) next »