Re: MySQL_Fetch_Array

From: Date: Sun, 07 Oct 2001 14:40:31 +0000
Subject: Re: MySQL_Fetch_Array
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13085@lists.php.net to get a copy of this message
"Petr Kadlec" <petr.kadlec@ecomma.cz> wrote in message news:000001c14f3b$69b021e0$050a0a0a@pkad... > Im beginer in PHP. Help me please. I have one question. > > In database I have record > > id name city street > ------------------------------------------------------------------ > 123 Peter CITY 23 STREET 25 > > When I use > $rec = MySQL_Fetch_Array($res) > > and > > echo "".$rec["city"]." ".$rec["street"].""; > > I give only > > CITY STREET > why not CITY 23 STREET 25 ... make sure the database contains what you think it does; you have to quote strings containing spaces to enter them into the database. If you didn't do that, it's quite possible that your database actually only contains 'CITY' and 'STREET', in which case your results are to be expected.

« previous php.db (#13085) next »