Reply to Re: Return next/previous record from array with non-consecutive record id's

Your name:

Reply:


Posted by -Lost on 10/11/95 11:53

"ClickToWalk" <admin@clicktowalk.com> wrote in message
news:44bfb933$1_4@mk-nntp-2.news.uk.tiscali.com...

> This is a bit of code that I have used to successfully echo all the available records -
> with gaps where records are missing - but what modifications do I need to make to it so
> that only one row is returned from the recordset, determined by $id.

You could throw an if clause in checking the number of rows returned (mysql_num_rows) or
even possibly check with mysql_affected_rows (assuming an INSERT, DELETE, or UPDATE).

You could also LIMIT your results and output those three rows [previous, current, next].

Lastly, your query function could do the same as the above, but then also check to see if
they are valid results. This you could add to your existing code...

-Lost

[Back to original 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

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