[PHP-WIN] Re: [PHP] A bd problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Carlos Castillo wrote:

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.

If you're using a VARCHAR(x) column where x is greater than 255, then you will not get anything past 255 characters. It's an issue with the connection library to mssql. Use a text column for anything over 255 characters.


--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux