Training, Open Source computer languages

This is page http://www.wellho.net/forum/The-MySQ ... abase/Different-versions-and-importing-a-text-file.html

Our email: info@wellho.net • Phone: 01144 1225 708225

 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Different versions and importing a text file

Posted by jill (jill), 31 October 2002
We have two web servers, one for development only, and the other is the live server.  Ideally they would have exactly the same software, but as it happens they don't.  I have been told that the development server is running mysql v 3.23.44 whereas the live server is running 3.23.32.

We update the mysql database by importing a text file.  On the dev server when we import the file and count the records there is always an extra one, a blank record right at the end.  When we import the same text file to the live server, the record count is correct and there is no blank record at the end.

The way I do the import is with an insert into command.

The later version of the software is the one which adds the blank record, so any ideas about why the difference and anything I should do to avoid adding the blank record would be very welcome.

TIA

Posted by admin (Graham Ellis), 1 November 2002
Hmm.   Is there a blank line on the start or end of the text file by any chance?  If so, any way to strip it off?  Forgive me starting at basics.

If that's not a solution, another work around might simply be to add a "delete where somefield = "" " onto the end of your import script - I really think that would be easier than looking for the difference in the versions, especially as it might turn out that the later version is the one that's technically doing the right thing for some reason.



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho