|
Posted by James_sgp on 06/20/07 13:33
On Jun 20, 4:22 pm, Geoff Berrow <blthe...@ckdog.co.uk> wrote:
> Message-ID: <1182325982.532226.144310@i13g2000prf.googlegroups.com> fromJames_sgpcontained the following:
>
>
>
>
>
> >On Jun 20, 2:58 pm, Geoff Berrow <blthe...@ckdog.co.uk> wrote:
> >> Message-ID: <1182306258.201378.288...@j4g2000prf.googlegroups.com> from
> >>James_sgpcontained the following:
>
> >> >The problem is that the variable
> >> >$max_depth isn`t updated when it is written into the database, hence
> >> >the original value is always there.
>
> >> Then you have to do the debugging all of us do. If you have
> >> something like
> >> $sql= "INSERT... ";
>
> >> Then add
> >> echo $sql;
> >> to see whether the variable is making it to the insert statement
> >I have...
> >The SQL query contains the old value, while is i 'echo' the variable
> >before making the SQL staement it contains the new number!
>
> so you've done
>
> if(strcmp($distance,"ft")==0) $max_depth=$max_depth/3.28;
> echo $max_depth;
> $sql= "INSERT... $max_depth ... ";
> echo $sql;
>
> and $max_depth is different in the INSERT statement?
>
> --
> Geoff Berrow 0110001001101100010000000110
> 001101101011011001000110111101100111001011
> 100110001101101111001011100111010101101011- Hide quoted text -
>
> - Show quoted text -
Geoff,
Yes you are correct...it is still the original value (ie.it seems to
not update after doing the sum!
Navigation:
[Reply to this message]
|