You are here: Re: UPDATE and increment by 10 « All PHP « IT news, forums, messages
Re: UPDATE and increment by 10

Posted by Koncept on 10/11/91 11:57

In article <1157364600.216357.295160@h48g2000cwc.googlegroups.com>,
version2 <corbett.jarrod@gmail.com> wrote:

> I am trying to create a navigation script that i can control the
> ordering of the levels using up and down arrows.
>
> I have had no luck with this and trying to find a script or something
> to help me out.


Not sure if I am following you, but this will create an array with
values (10,20,30,40,50). You can do whatever else you have to do after
that - just play with the range values.

<?php
$steps = range(10,50,10);
foreach($steps as $step){
mysql_query("UPDATE foo SET bar = '$step' WHERE ... ");
}
?>

--
Koncept <<
"The snake that cannot shed its skin perishes. So do the spirits who are
prevented from changing their opinions; they cease to be a spirit." -Nietzsche

 

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

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