Author
|
Message
|
Veteran Member
|
04-21-2008
, 02:27
SQL Null Values in Blob
|
#1
|
I'm using a blob to store files (in this specific case, plugins) in mysql. The problem is it appears to stop when it hits a null value on a query. In the case of this code, it writes the data that is in the blob up until it hits a null value, then it continues to write nulls. I wasn't sure if this is a bug, which is why I am posting it here first, so any ideas?
for (new i=1;i<=SQL_NumResults(query);i++){
SQL_ReadResult(query, 0, name, 32)
SQL_ReadResult(query, 1, result, 65535)
length = SQL_ReadResult(query, 2)
file = fopen(name, "wb")
fwrite_blocks(file, result, length, BLOCK_BYTE)
fclose(file)
SQL_NextRow(query)
}
|
|
|
|