List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:September 23 1999 5:20am
Subject:Re: Update of REAL give NaN
View as plain text  
On Thu, 1999-09-23 15:01:41 +1000, A Hall wrote:
> I have a tabel with a column defined as REAL in it (It is a port from msql)
> When I run  an UPDATE statement  from within php3  the value comes through
> as NaN ( Not a Number)
> Integer fields  and string  fields are update OK 
> 
> The Syntax is 
> UPDATE cust SET Name = 'My Name;, Count = 1 , Balance = 2000 WHERE CustId =
> 1102
> 
> 
> Running interactively from the command line  works , Only from within PHP
> 
> Any Help appreciated

The UPDATE command above looks fine (besides the wrong quoting if the
Name value, but that probably is only a typo.).
To be sure, that your query actually looks like this, you might print
on the screen before the actual query.  Something like:
  $query = 'UPDATE ... WHERE CustID = 1102';
  print "Query: " . htmlspecialchars($query) . "<BR>\n";
  $resultid = mysql_query($query) or die("Syntax error in SQL query!");

How did you check the updated value?  The UPDATE command itself
doesn't return a result row, so you probably have done a SELECT and
then retrieved the result of this SELECT.
Maybe the error is somewhere there?

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Thread
Update of REAL give NaNA Hall23 Sep
  • Update of REAL give NaNA Hall23 Sep
    • Re: Update of REAL give NaNMartin Ramsch23 Sep
  • Re: Update of REAL give NaNMartin Ramsch23 Sep