kyles0623 Posted June 27, 2010 Share Posted June 27, 2010 I am trying to create a simple CMS and when someone deletes an article I want to loop through all of the articles and make it in order. For example, is I have article numbers: 1,2,3,4,5 and I delete 4, then I want to loop through all the articles so it goes 1,2,3,4. Help? Quote Link to comment https://forums.phpfreaks.com/topic/206006-looping-through-articles-help/ Share on other sites More sharing options...
Mchl Posted June 27, 2010 Share Posted June 27, 2010 How is that MySQL related? Quote Link to comment https://forums.phpfreaks.com/topic/206006-looping-through-articles-help/#findComment-1077958 Share on other sites More sharing options...
kyles0623 Posted June 27, 2010 Author Share Posted June 27, 2010 OH because it is saved into my table and I dont know how to loop through all the articles on the table and change something for each. Quote Link to comment https://forums.phpfreaks.com/topic/206006-looping-through-articles-help/#findComment-1077960 Share on other sites More sharing options...
Mchl Posted June 27, 2010 Share Posted June 27, 2010 Still, I think that's more a PHP coding issue. Moving there. Quote Link to comment https://forums.phpfreaks.com/topic/206006-looping-through-articles-help/#findComment-1077968 Share on other sites More sharing options...
awjudd Posted June 27, 2010 Share Posted June 27, 2010 Are you wanting the actual unique IDs to be decreased by 1 ... or do you just want to do it on the PHP side? ~juddster Quote Link to comment https://forums.phpfreaks.com/topic/206006-looping-through-articles-help/#findComment-1077986 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.