Lawrence Blades wrote:
>
> I tried to backup a table using select and fopen to write the data to a
> tab delimited file.
> The table has 1000 names with addresses.
> The execution quit after 30 seconds telling me it took too long.
>
> SCRIPT:
> $result = mysql_query("SELECT * FROM whitepages ORDER BY lastname ");
> $num=mysql_num_rows($result);
> while ($row=mysql_fetch_row($result) )
> {
> for ($counter=0; $counter<$num; $counter++)
> {
> fputs ($myfile, "$row[$counter]\t\n");
> }
> }
>
> Question 1. Is the table too big for MySql capabilities?
>
> Question 2. I want to backup certain tables in my database (not ALL the
> tables, just selected ones).
> If I do mysqldump, I get them all, and not in the format I desire.
>
> Is there another way to backup a single table in tab delimited format?
>
> --
> Lawrence Blades
> Digital Technologies
> P.O. Box 673
> Clarksdale, MS 38614
>
> Church Office: 601.624.6586
> COL Office: 601.627.5554
> FAX: 601.627.6797
> Home: 601-627-9539
> Cell: 601.621.3092
> http://www.clarksdale.com
> lrblades@stripped
> (If you can't find me, I can't be found.)
>
Looks like there is something wrong with your set up. 1000 records on
any system should be a piece of cake to deal with. Try the following:
- du to see if maybe your disk is full
- tail your error logs, maybe there is some enlightening info in there
- isamchk your tables
Let us know what happens.
--
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)