For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > July 2005 > PHP and Sybase text datatype question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PHP and Sybase text datatype question
Frank Hamersley

2005-07-24, 8:21 pm

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.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com