I'm returning this discussion to the
list where it belongs....
Are you sure that the query you do on the
command line is the same as the one you do in the program? Obviously, they can't
be precisely identical because the program needs additional punctuation to work
but is it functionally the same?
For example, does the command line version
of the query have:
passengerIndex =
'15'
or
passengerIndex =
15
If the passengerIndex column is defined to
contain character data, the apostrophes are appropriate for both the command
line and Perl versions of the statement; otherwise, the apostrophes should be
omitted in both versions.
Also, have you typed the literal value
'Edo Budiharto' exactly the same in both queries? If the data contains a single
space between the first name and the last name and the command line version
of the query also contains one space but the Perl version contains two spaces,
this could explain the different behaviour of the queries.
Did you commit the update before
inspecting it? If I recall correctly, Perl, like other languages, requires
that you commit updates before they are visible to users. Perhaps you failed to
commit and that is why you aren't seeing any apparent change in your data. Try
making sure that you did a commit - and that it worked! - before looking to see
that the update worked. My Perl is VERY rusty but if it works like other
languages, you will have an option to either "autocommit", i.e. commit after
every statement, or you will be able to commit manually; if you say
"autocommit=no" and fail to commit manually, your update won't be visible until
a commit happens. (Typically, if the program ends normally, a commit will be
issued "under the covers" but if you are inspecting the value from the command
line before the program has ended, the commit may not have happened yet which
would explain why the update doesn't appear to have taken place.)
Rhino
|
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 15/03/2005
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]