help a newbie
Posted by: Justinzane (---.164.212-222.static.3bb.co.th)
Date: January 21, 2013 09:49AM

Hi,

have a database problem... Php code allows me to import only 100 characters per row into mysql database. How could I import more characters?

Thanks

Options: ReplyQuote
Re: help a newbie
Posted by: RiggsFolly (---.as13285.net)
Date: January 21, 2013 10:20PM

For importing large databases its better to use the mysql.exe program


left click wampmanager -> MySQL -> MySQL Console

unless you have changed the root userid's password just hit enter when you get the password challenge.

at the mysql> prompt keying the following

mysql>use your_database_name;

mysql> source c:\My\Folder\containing\the\database\backup\file.sql

and it will run it.

Options: ReplyQuote
Re: help a newbie
Posted by: Justinzane (---.205.218-186.dynamic.3bb.co.th)
Date: January 23, 2013 07:25AM

Not sure if that is what I'm looking for.

Problem is that I have php script that imports words/sentences to mysql database from text file. And if sentence is too long, it does not fit to database and is just cut from the middle of sentence. What should I do to avoid this to happen and get full sentences imported?

Options: ReplyQuote
Re: help a newbie
Posted by: stevenmartin99 (Moderator)
Date: January 23, 2013 07:40AM

Just increase the length of the field in the table.

Change that field to varchar(1000). For example

And in you php check the length using len($var) to make sure it's not longer than the field limit

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: help a newbie
Posted by: Justinzane (---.205.218-186.dynamic.3bb.co.th)
Date: January 23, 2013 08:05AM

Sorry to be such a newbie, but the code is not mine and I don't have really any coding experience. I can make simple changes to the code, but I need quite specific instructions.

So would really appriciate if you could walk me trough how to increase that field in the table/change what field to varchar(1000)? How is that done?

Options: ReplyQuote
Re: help a newbie
Posted by: RiggsFolly (---.as13285.net)
Date: January 23, 2013 04:16PM

Use phpMyAdmin ( left click wampmanager icon -> phpmyadmin )

Select your database

Select the table you are loading

Find the field that is too short

Increase its size as above

Options: ReplyQuote


Sorry, only registered users may post in this forum.