Jump to content
  • Advertisement
Sign in to follow this  
mike74

inserting large text in mysql

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

If you intended to correct an error in the post then please contact us.

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 this post


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

Share this post


Link to post
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 Sneftel
Use parameter binding to prepared statements. Also, if it's a _lot_ of text, consider using BLOBs instead of text or varchars.


Share this post


Link to post
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:
Original post by Sneftel
http://www.google.com/search?&q=mysql+php+prepared+statements


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!