Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

w2ksp4.exe, WwwxxXdbf, procmail "FROM_MAILER" patch, Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF

Links

XODOX
Impressum

#1: Weird UPDATE Problem

Posted on 2011-10-10 15:14:35 by forum

Hello all.
I have recently finished my migration from an older server to a newer
server running RHEL 6. The MySQL version went from=A05.0.77 to=A05.1.52.
In my application, this query used to work just fine:

$paid_query =3D mysql_query("UPDATE $table_name SET owed =3D 0 WHERE s_id
=3D $student");

Where table_name was
mysql_real_escape_string("collection_41_students"). With the new MySQL
version, the UPDATE query does not work, and echo mysql_error();
results nothing.

Is my syntax correct going from version to version?

Thanks in advance,

David

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Report this message

#2: Re: Weird UPDATE Problem

Posted on 2011-10-10 15:19:18 by Brandon Phelps

That query looks fine. What error are you getting if you execute the query from the CLI? Also is it possible that the s_id or owed columns are no longer numeric data types? If this column(s) is/are a character type now, then you would need to have the values in quotes.

-Brandon

On 10/10/2011 09:14 AM, D. Marshall Lemcoe Jr. wrote:
> Hello all.
> I have recently finished my migration from an older server to a newer
> server running RHEL 6. The MySQL version went from 5.0.77 to 5.1.52.
> In my application, this query used to work just fine:
>
> $paid_query = mysql_query("UPDATE $table_name SET owed = 0 WHERE s_id
> = $student");
>
> Where table_name was
> mysql_real_escape_string("collection_41_students"). With the new MySQL
> version, the UPDATE query does not work, and echo mysql_error();
> results nothing.
>
> Is my syntax correct going from version to version?
>
> Thanks in advance,
>
> David
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Report this message

#3: Re: Weird UPDATE Problem

Posted on 2011-10-10 16:27:30 by (Halász Sándor) hsv

>>>> 2011/10/10 09:19 -0400, Brandon Phelps >>>>
If this column(s) is/are a character type now, then you would need to have the values in quotes.
<<<<<<<<
Note that because of implicit conversion if they had numberic values no error would be reported, but maybe the equality would not be exact.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Report this message