downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

mssql_field_name> <mssql_fetch_row
[edit] Last updated: Fri, 17 May 2013

view this page in

mssql_field_length

(PHP 4, PHP 5, PECL odbtp >= 1.1.1)

mssql_field_lengthRestituisce la lunghezza di un campo

Descrizione

int mssql_field_length ( resource $id_risultato [, int $offset ] )

Questa funzione restituisce il valore del campo numero offset dalla query indicata da result. Se si omette offset la funzione resituisce il valore per il campo corrente.

Nota: Nota per gli utenti Win32
A causa delle limitazione delle sottostanti API utilizzate dal PHP (MS DbLib C API), la lunghezza dei campi VARCHAR è limitata a 255. Se si ha necessità di memorizzare maggiori informazioni, utilizzare il tipo TEXT



add a note add a note User Contributed Notes mssql_field_length - [2 notes]
up
0
zz(lost dot childz at gmail dot com)
5 years ago
there are same problem with VARBINARY, if you are forced to use existing database with such fields you can do it like this:

SELECT CAST(master.dbo.fn_varbintohexstr(VARBINARYFIELD) AS TEXT) FROM table;
up
0
Anonymous
8 years ago
You can also work around this limitation with the following:

   -- for example, with MyVarCharField VARCHAR(1000)
   SELECT CAST(MyVarCharField AS TEXT) FROM MyTable

 
show source | credits | stats | sitemap | contact | advertising | mirror sites