You are here: Re: strange behaviour using arrays to update records « PHP Programming Language « IT news, forums, messages
Re: strange behaviour using arrays to update records

Posted by mantrid on 08/07/06 16:38

ok i got it
silly me
i hade commented out the setting of the variable

$commindexarray=$_POST['commindex'];


THANKS ALL for the help


"mantrid" <ian.dandav@virgin.net> wrote in message
news:gtJBg.5937$oW3.5333@newsfe6-win.ntli.net...
>
> >
> > This I did and it is as expected,
> > Another thing I tried was to put the queries outside of the loop and
> > substitute the values from the arrays (which are also ok as i checked
them
> > when i ran phpinfo()) with numbers as shown below
> >
> >
> > $q2 ="UPDATE usercomms SET typeid=1 WHERE userid=".$_SESSION['userid']."
> AND
> > commindex =339";
> > $updateusercomm = mysql_query($q2) or die('<br><span
> class=RedWarning>Sorry,
> > there was a problem updating. Try again.<br><br>Error - 1
> > '.count($delarray). mysql_error().'</span>');
> >
> > $q="UPDATE comments SET typeid=1, comment='ggdsffgdsfg', available=1,
> > timestp='$currtime', globalavail=0 WHERE commindex=339"; $updatecomm =
> > mysql_query($q) or die('<br><span class=RedWarning>Sorry, there was a
> > problem updating some records. Try again.<br><br>Error - 2
> > '.count($delarray).mysql_error().'</span>');
> >
> > And this worked. so it looks like it is the loop or something
> >
> > by the way miguel I like your photos. i to love travelling but havent
put
> > mine on the web, something i'd like to do. much of mine are still on
paper
> > so a lot of work to do.
> >
> > Ian
> >
> >
>
>
> ok getting closer. it is this bit
>
> for ($i = 0; $i < count($commindexarray); $i++){
>
> i tested it with the following and it worked on those 100 records
>
> for ($i = 0; $i <= 100; $i += 1){
>
>
> ian
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация