Upload

Loading icon Loading...

This video is unavailable.

php id problem - help needed!

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to like MylesBetterMedia's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to dislike MylesBetterMedia's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to add MylesBetterMedia's video to your playlist.

Published on Jun 27, 2013

Hi, I've recently developed a CMS from scratch using PHP and MySQL running through Apache/phpmyadmin on a localhost.

Everything has gone very smoothly so far, visitors may view articles and navigate through the page successfully. Admins (created by an Admin on the CMS or in the MySQL schema) can log in, view articles, edit articles, view and edit users and delete articles.

My problem is that when articles are deleted, a next/previous button at the bottom (of any existing articles) with a function of id - 1 which looks for a previously existing article with x-id, however since this article was deleted it no longer exists. Is there any way to remove the article id as the article is deleted, thus freeing up that article id again?

I can manually reset the id to 0,1,2,3... etc. in the schema on phpmyadmin, but I'd like to apply some logic in order to make this system work flawlessly.

Many thanks for you help, if I get time I'll upload the CMS to my web server so that it can be viewed freely.

~Myles

Loading icon Loading...

Loading icon Loading...

Loading icon Loading...

The interactive transcript could not be loaded.

Loading icon Loading...

Loading icon Loading...

Ratings have been disabled for this video.
Rating is available when the video has been rented.
This feature is not available right now. Please try again later.

Loading icon Loading...

Loading...
Working...
to add this to Watch Later

Add to