note 24397 deleted from function.ocibindbyname by sixd

From: Date: Wed, 20 Nov 2013 19:47:37 +0000
Subject: note 24397 deleted from function.ocibindbyname by sixd
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197587@lists.php.net to get a copy of this message
Note Submitter: max at pict dot lviv dot ua ---- For those, who may wish to determine column size before execution of query, I suggest to use DBA_TAB_COLUMNS view. I did it with this function: function db_column_size($table,$column) { $connection = db_connect(); $query = "SELECT DATA_LENGTH FROM DBA_TAB_COLUMNS ". "WHERE TABLE_NAME='".strtoupper($table)."' ". "AND COLUMN_NAME='".strtoupper($column)."'"; $statement = OCIParse($connection, $query); OCIExecute($statement); ocifetchinto($statement,$row,OCI_ASSOC+OCI_RETURN_NULLS); return $row["DATA_LENGTH"]; }

« previous php.notes (#197587) next »