MySQL list,
I'm afraid this explanation is a bit long, but hopefully it's clear
and concise.
A while back I reported having troubles copying a database from my
hosting service to my home machine.
One of the problems I encountered was that I had some table columns
named "group", which is a reserved word in MySQL. I've since corrected
that error by renaming every instance of the word "group" with the word
"groupid". This also entailed editing my PHP files, which took some time.
However, at this point, the database and associated PHP files were
succesfully corrected, and are working fine on my hosting service. So I
downloaded all PHP files to my home computer, and exported my database
(structure and data), to a .sql file.
My .sql file imports into my home SQL server without returning errors.
And almost all the PHP pages that seek to get any data from the
database return this error:
Warning: mysql_data_seek(): Offset 0 is invalid for MySQL result index
11 (or the query data is unbuffered) in
/home/dave/web_sites/tokyocomedy.com/site_files/show.php on line 51
Because the pages work flawlessly on my hosting service, I have to
assume that there is some flaw in how it's all being copied to my home
computer. The PHP files are just copied by FTP, so it's unlikely that
they have been altered.
The MySQL data, however, is under suspicion because I have Japanese
text, and on my home computer, not all of it is displaying correctly.
Some of it comes up as question marks when viewed in FireFox.
When I have the .sql file on my desktop, I can open it in OpenOffice
Write, as a text encoded file, and verify that it is encoded in utf-8.
Most of the Japanese text shows up readable. Some of it, however, shows
up as coded numbers (I'm not sure what the term is when utf displays
this way): メーン・
When I import the .sql file into MySQL, I can look at it in
phpMyAdmin and see that the text that displayed correctly as Japanese in
OpenOffice still displays correctly as Japanese. The text that was in
number form is also still in number form when viewed through phpMyAdmin.
In short, phpMyAdmin sees it after import the same way that OpenOffice
did before import.
But, then when I view a PHP file in FireFox, and it accesses the
database that way, the situation changes. The text that is encoded as
numbers displays as correct Japanese. The text that displays as actual
Japanese text in OpenOffice and phpMyAdmin now displays as quesiton marks.
Again, just to be clear, all Japanese characters and all database
data display correctly when viewed from the hosting service. The fact
that the Japanese is not displaying correctly and the database error may
not be correlated. But I'm hoping that solving one will either alleviate
the other, or that solving one will make more clear what the other
problem is. One problem at a time, although I don't care which one is
solved first.
I'm a bit stumped as to how to diagnose and solve exactly what the
problem that causes what should be the same data on both my home machine
and the hosting service to behave differently.
Any advice on how to solve this would be much appreciated.
Thank you for taking the time to read this.
--
Dave M G
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]