Re: Problem, please help!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



it looks like the use of double and single quotes could be at fault

try writing it like
$sql = "UPDATE round1
        SET game1='" . $game1 . "',
            game2='" . $game2 . "',
            game3='" . $game3 . "',
            game4='" . $game4 . "',
            game5='" . $game2 . "',
            game6='" . $game6 . "',
            game7='" . $game7 . "',
            game8='" . $game8 . "',
            misc='y'
        WHERE username = '" . $sidarray[0] . "'";

matt

Quoting JeRRy <jusa_98@xxxxxxxxx>:

> > > <snip>
> > >
> > > $sql = "UPDATE round1 SET game1='$game1' ,
> > > game2='$game2' , game3='$game3' , game4='$game4'
> > > , game5='$game5' , game6='$game6' , game7='$game7'
> > ,
> > > game8='$game8' , misc='y'
> > > WHERE username= \"$sidarray[0]\"";
> > 
> > 
> > This only updates an existing record, where the
> > username is equal to 
> > $sidarray[0]. Don't expect it to insert new data.
> 
> Yes tried both, insert and update.  Both fails. 
> Including a 'or die' statement in the mysql connection
> but does not return it can't connect.  So it must be
> connecting just not posting. :(  Any other problems
> that could cause this?
> 
> > 
> > > Okay it output on the php page fine but won't save
> > to
> > > db, anyone know why?
> > 
> > Secondly, please put a little effort in writing
> > quality code and markup 
> > before you post it here. <br> is really ugly...
> 
> I stated in my first post the code was messy ... Think
> messy and ugly match in some way.  It's just a quick
> job that worked fine last year but does not wanna work
> now. :(  I must of changed something before I ended my
> work last year on it to make it not work.  I'll keep
> trying some stuff.  Think it might have something to
> do with my cookie.php file as I require sidarray[0]
> which is fed from that.
> 
> J
> 
> Find local movie times and trailers on Yahoo! Movies.
> http://au.movies.yahoo.com
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux