Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

SQL query max size? 
 
Sintax
Member
 
Total Posts:  58
Joined:  2008-02-18
Hungary
 

Hi,

I am having trouble submiting a query which has data over 2K. I did a custom form which the user enters HTML code (just like the CMS) and I post that to the database. If the code is under 2.700bytes then it gets submitted succesfuly, if its over then either I get a white screen or an error SQLSTATE. How can I increase the size?

Here is the code in my postAction:

$connection    Mage::getSingleton('core/resource')->getConnection('catalog_write');
         
         
$content addslashes($content);
         
         
$sql "";
        if (
$modify){
            $sql 
"UPDATE custom_info SET ci_info='$content'  WHERE ci_attr_option_id='$optionid' AND ci_attr_id='$attribid'";
        
}else{
            $sql 
"INSERT INTO custom_info (ci_attr_option_id,ci_attr_id,ci_info) VALUES ('$optionid','$attribid','$content')";
        
}
        
        $connection
->query($sql);

The $content variable is the one getting the data from the posted textarea. Any ideas? I looked at php.ini and postmax size is 32MB which makes this another issue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Magento does not limit query size.
Pasting full error message might help

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top