Re: SQL Server 7 help needed!!!
| From: | Romulo Roberto Pereira | Date: | Wed, 03 Jan 2001 20:56:53 +0000 |
| Subject: | Re: SQL Server 7 help needed!!! | ||
| References: | 1 2 3 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4776@lists.php.net to get a copy of this message | ||
Hi Paco,
> Hi:
>
> I reply to myself:
>
> > I'll take a look to the source code of php_mssql.dll, perhaps there is a
limit >when allocating the buffers for the resultset.
>
> It seems php_mssql.dll uses a MSSQL API called "dbdatlen". This API is not
suitable for text or image fields. In fact, it returns a false text size of
8k (or 4k, depending on the client libraries and SQL server version you're
using), even if there is more data.
>
> So I guess some modifications could be made, perhaps using BLOB-specific
functions. Personally I would keep long chunks of text away from a Web app,
but handling ir carefully...
>
> I'm going to ask the maintainer if some work is currentry being done about
this.
>
That is great - I am looking forward to this...
> You also have to ask yourself if you really need to handle those amounts
of data. Perhaps you have to establish a limitation or split your data among
several columns (yeah, I know, I know, but if you are desperate...)
>
The problem is that the users that use the site to post info are investors
and technical financial people and most of the times their texts are 10 to
25 pages long. What they do is copy and paste in a <textarea> - by the way -
this function:
// fix text
$text = nl2br($text);
$text = ereg_replace("\n", "", $text);
$text = ereg_replace("\r", "", $text);
$text = ereg_replace("'", "'", $text);
works great to fix the text before you put in the database - and I have to
handle the db stuff. I insert with no problem, but MSSQL chop my text
without telling me (bastard!!). For a quick fix (I need to put something
online tomorrow) I am installing MySQL that appears to handle better this...
> Greetings,
>
> Paco
Best regards and thanks to all your help,
Romulo