![]() |
Sending large amounts of text to MySQL
Hey there,
I've recently been making quite a large hack and i have stumbled accross a small problem :( The field "text" in the MySQL database is MEDIUMTEXT The hack i am creating is a blogging system, it sends the blogs to MySQL in their inputted form and then when outputted the text goues through parse_bbcode2. When i submit the form and send stuff off, things usually go ok, however i recently discovered that when sending off large amounts of text i would get a mysql error..It may be due to characters such as "." "," "'" I am not sure :( What would be stopping a peice of text from going into mysql? If i cannot find out i may just try to find exactly what happens when a post is submitted and duplicate that into my code allthough that would take me ages... Any suggestion? Thanks, RoundHost P.s Sorry if my post may be a bit of a mess :( Its 2:00 am and i have been coding this all day :hurt: |
You should look into the mysql max_packet_size variable in your my.cnf file. Make sure it's large enough.
|
Nope, its not that i just determined that if i add a ' then it doesnt work regardless of the size of the text ;) It just took me quite a large peice of text before i acctually used a ' :glasses:
|
addslashes() is the function you need
|
Quote:
|
Quote:
[sql] SHOW VARIABLES LIKE "max_packet_size" [/sql] The column name it returns for the value is "Value" (that same case). |
All times are GMT. The time now is 05:31 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|