Re: PHP & MSSQL

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

 



Shaun, the MySQL manual suggests that you have hit your limit using the
VARCHAR field type (255 characters). To store 6,000 characters have you not
considered using the TEXT field type?



"6.2.3.1 The CHAR and VARCHAR Types
The CHAR and VARCHAR types are similar, but differ in the way they are
stored and retrieved.

The length of a CHAR column is fixed to the length that you declare when you
create the table. The length can be any value between 1 and 255. (As of
MySQL Version 3.23, the length of CHAR may be 0 to 255.) When CHAR values
are stored, they are right-padded with spaces to the specified length. When
CHAR values are retrieved, trailing spaces are removed.

Values in VARCHAR columns are variable-length strings. You can declare a
VARCHAR column to be any length between 1 and 255, just as for CHAR columns.
However, in contrast to CHAR, VARCHAR values are stored using only as many
characters as are needed, plus one byte to record the length. Values are not
padded; instead, trailing spaces are removed when values are stored. (This
space removal differs from the SQL-99 specification.) No case conversion
takes place during storage or retrieval.

If you assign a value to a CHAR or VARCHAR column that exceeds the column's
maximum length, the value is truncated to fit."



----- Original Message -----
From: "Shaun Bentley" <shaun.bentley@ntlworld.com>
To: <php-db@lists.php.net>
Sent: Monday, August 11, 2003 11:23 AM
Subject:  PHP & MSSQL


> Hi
>     I am currently trying to use PHP and MSSQL together but I am having a
> few problems.
>
> I can enter data into the Db OK, but when pulling the data back to display
> on the page, the string cuts to around 250 chars. The Db field is VarChar
> 6000 and I can see the whole data in the field.
>
> I have tried pulling the data out as object, array & row but always lose
the
> end.
>
> Any help please!
>
> Shaun
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.506 / Virus Database: 303 - Release Date: 01/08/2003


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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux