RE: [PHP] A bd problem
| From: | Ralph Guzman | Date: | Thu, 04 Sep 2003 23:11:17 +0000 |
| Subject: | RE: [PHP] A bd problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161700@lists.php.net to get a copy of this message | ||
First, do not use HTML email for posting questions to the list.
Take a look at:
$not = $consulta->fetch_row($res);
not familiar with your BaseDatos class, but fetch_row will normally
return an enumerated array, this means that rather than using
$not['Descripcion'] you should be using $not['0'], $not['1'],
$not['2'],
etc.
if you want to use an associative array ($not['Descripcion']) you should
be using
$not = $consulta->fetch_array($res);
or
$not = $consulta->fetch_assoc($res);
-----Original Message-----
From: Carlos Castillo [mailto:ccastillo@imagine.com.co]
Sent: Thursday, September 04, 2003 2:34 PM
To: 'php-general@lists.php.net'
Cc: 'php-windows@lists.php.net'
Subject: [PHP] A bd problem
Importance: High
HI, i have the following problem
Im working with sql server 2000 in a windows xp pc, then in the bd i
have a table called "noticias" and a text type field, when i insert into
the field everything goes rigth, but when i try to get the info of teh
field, i can get all the info, is like the variable is not enough to
save all the info but im sure that all the info is in the bd, the code
is the following:
$consulta = new BaseDatos;
$consulta->connect();
$sql = "select * from Noticias where Id=".$_GET["id"];
$res = $consulta->query($sql);
$not = $consulta->fetch_row($res);
$not["Descripcion"] =
eregi_replace(chr(13),"<br>",$not["Descripcion"]);
echo $not["Descripcion"];
when i do an echo for $not["Descripcion"] i can see that it doesnt have
all the info of the field Descripcion on the table noticias.
can you help me please?, is urgent!
thanks!
Carlos A. Castillo.
Ingeniero de desarrollo
ccastillo@imagine.com.co
____________________________________
Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57 1)6163218
Bogotá - Colombia
____________________________________
- Soluciones web para Internet e Intranet
- Soluciones para redes
- Licenciamiento de Software
- Asesoría y Soporte Técnico
____________________________________