Re: Weird result from query...?

From: Date: Fri, 27 Feb 2004 01:24:48 +0000
Subject: Re: Weird result from query...?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-178979@lists.php.net to get a copy of this message
&p=4.78 I wonder if a dot is a valid character for a URL adderss? > Hi, > Just been getting some weird results from a query...can anybody tell me > why..? > > Basically am sending 3 variables via a link on the page... > > http://localhost/show_accounts.php?o=8927437717300145&n=shane&p=4.78 > > which runs the sql in show_accounts.php: > SELECT *,now()-0 from ".$tcname." where oorder='".$o."' and > nname='".$n."' and total='$p' > > (globals is off and i am assigning the variables on top of the page. eg: > $o=$_GET['o'],) > > my tables structure is: > oorder varchar(20) // varchar because I will have dashes and underscores > in it. > nname varchar 60 > total float(6,2) > > I have checked the database and I DO have a record that matches the SQL > above but it does not > return a result _unless_ the decimal spaces have two zeros in it, eg: > 4.00 works fine > 1.00 works fine > 77.00 works fine > 4.77 does not work > 1.42 does not work > etc > > I have taken out the purchase amount and everythings running fine...but > am just curious as to what was > actually causing the problem...any ideas?

« previous php.general (#178979) next »