NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL question

tom at supertom.com tom at supertom.com
Fri Nov 15 15:08:18 EST 2002


Yeah, I figured that I was going to have to do this.  I did get excited when
I saw the mysql_info() function in the docs, but lost hope when I saw it was
only available in CVS (going to CVS is not an option for me).  Your
suggestion of adding that func is a great one - lets up 4.3 comes out soon!

Thanks!

Tom

-----Original Message-----
From: Hans Zaunere [mailto:hans at nyphp.org]
Sent: Friday, November 15, 2002 2:35 PM
To: NYPHP Talk
Subject: Re: [nycphp-talk] MySQL question



--- tom at supertom.com wrote:
> I'm using the LOAD DATA query to load a file into a table, which is
working
> OK.  I would like to know if anyone has figured out a way to receive
> statistics about this query, mainly how many and which rows where skipped.
> According to this page:
>
> http://www.mysql.com/doc/en/LOAD_DATA.html

They speak of mysql_info() which is available in PHP.  It was requested by
yours truly months ago, however it still doesn't look like it'll be
available
until 4.3.

> there doesn't seem to be a way to do this easily.  I guess I can count the
> number of records in my file, and compare against the database to obtain
> the number of records skipped, and I could probably do a SELECT OUTFILE
and
> compare that file with my original file to see which records were not
> loaded, but this seems like alot of work for what I'm asking for.

There are a couple built-in MySQL variables (which escape me at the moment)
that might help, but essentially, yes, you'd probably be best off doing it
the hard way (or use a CVS of PHP).  This is why I requested mysql_info() be
available  :)



=====
Hans Zaunere
New York PHP
http://nyphp.org
hans at nyphp.org


--- Unsubscribe at http://nyphp.org/list/ ---





More information about the talk mailing list