inserting large text in mysql

This topic is 4719 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Does anyone know the easiest way to insert large quantities of text into a mysql database? My table has the following structure: CREATE TABLE tradealert ( thetime int(11) default NULL, alerttext text NOT NULL ) TYPE=MyISAM; I know I can just do a regular INSERT, but there are two problems with that: Sometimes the text is really long. Sometimes the text contains quotes and other characters that could mess things up. Mike C. http://www.coolgroups.com/zoomer/

Share on other sites
Use parameter binding to prepared statements. Also, if it's a _lot_ of text, consider using BLOBs instead of text or varchars.

Share on other sites
How do you use parameter binding in PHP? I looked in the manual and searched, and found nothing.

Mike C.
http://www.coolgroups.com/zoomer/

Quote:
 Original post by SneftelUse parameter binding to prepared statements. Also, if it's a _lot_ of text, consider using BLOBs instead of text or varchars.

Share on other sites
It says "Call to undefined function mysqli_connect". Is this stuff only available in the later versions of PHP?

I'm doing a project for someone else, and I can't rely on a rarely supported feature. Is that what this is? What did people do before mysqli?

Mike C.
http://www.coolgroups.com/zoomer/

Quote:

• 23
• 10
• 19
• 16
• 14