PHP and Sybase text datatype question
| From: | Frank Hamersley | Date: | Wed, 20 Jul 2005 03:27:14 +0000 |
| Subject: | PHP and Sybase text datatype question | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-39960@lists.php.net to get a copy of this message | ||
Has anyone tangled with Sybase text (and/or image) datatypes and the
writetext/readtext commands from PHP?
I have the CT library linked in, but because Sybase does not support these
datatypes as either parameters to stored procedures (or as @variables within
stored procs either) I was wondering what the best practice would be to
manipulate (retrieve and store) blobs like these especially if minimal
logging was mandated.
The SQL Advantage statements required are like ...
declare @vb16 varbinary(16)
select @vb16 = textptr(col) from tbl where key = "therowkey"
writetext tbl.col @vb16 "Very large text string!"
Has anyone found a way to do this from PHP or do I have to sanction direct
access to the table for insert and update commands like ...
sybase_query('insert tbl (key, col) values ("therowkey", "hello
world")')
and
sybase_query('update tbl set col = "hello world" where key =
"therowkey"')
Cheers, Frank.