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

Posted by version2 on 10/11/68 11:57

Hi Arjen,

Can you please help me. I am trying to create a page order navigation
script that will list out all my pages in order of their value in the
position column. I can move the navigation item up or down but cant
seem to get their.

Theory this is have the navigation links are 20, 30, 40, 50, 60 before
moving the first navigation item up.

I add 15 to 20 so it becomes 35, then I want to re-order the list and
output the values like this, 30, 35, 40, 50, 60. Once this is done i
want to assign all new values to the navigation items starting from 20,
30, 40, 50.


This is my code soo far

if ($_GET[mode] == up) {

$queryzakken = "UPDATE ".DB_PREFIX."".TBL_PREFIX."SET position =
(position + 15)WHERE id = $id;";
$queryzakken1 = "SELECT position FROM ".DB_PREFIX."".TBL_PREFIX." ORDER
BY position";
mysql_query($queryzakken);
mysql_query($queryzakken1);
header("Location: index_exercise.php?ID=$muscleName");
}

Please can you help me.

J

 

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

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