Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by PCHomepage

  1. PCHomepage

    What has happened here to Tek-Tips??

    I haven't used Tek-Tips in over a decade but have also recently started getting messages out of the blue, some of which seem like junk or are on topics to which I've never subscribed for programming languages that I do not recognize. In any event, this appears to be a Microsoft Office group of...
  2. PCHomepage

    Show Single Row in Foreach

    Sounds good and makes perfect sense, thank you! I'll give it a try when I'm back home but if possible I would like to try to make it be self-contained within the function as it's being used in several different scripts.
  3. PCHomepage

    Show Single Row in Foreach

    This document is nearly 800 pages long so the data is grouped by some other value in such a way that the starting page of a given group can be anything, and each group is relatively short making it very manageable. The very first page of the first group is 1 but after that it changes based on...
  4. PCHomepage

    Show Single Row in Foreach

    Yes, PageNo comes from the database row which I had tried to say in my original question but perhaps wasn't too clear and yes, I want to show the HTML when the page number changes. That is exactly what I was trying to do but I wasn't sure what to use for comparison. $PageNoToCompare =...
  5. PCHomepage

    Show Single Row in Foreach

    It's not the solution I was looking for but I did find a work-around that does the job. By feeding the ID field into the function, then checking which row has the last page number before it changes, it then shows the information from the function in the proper places. In the meantime, I am open...
  6. PCHomepage

    Show Single Row in Foreach

    I don't know in advance how many rows there will be on any given page and used 41 only as an example of one of the data sets. $PageNo is a value from a field in the database and the foreach loop is below with the function being called toward the end of it. I did not show the database connections...
  7. PCHomepage

    Show Single Row in Foreach

    I wrote a function to put the page number at the bottom of each page and I understand in general why it's not working but cannot work out the logistics to make it work. This is being run inside a foreach loop after the rest of the content is written to the screen. $PageNo (and $RevDate) are...
  8. PCHomepage

    Query For Range Values Without Table

    As this seems an impossibility, thank you all who answered and I'll now move on to Plan B of doing it in PHP and modifying the function to also accept an array in addition to accepting the query. (Chris, I've always liked the quotes in your signature!)
  9. PCHomepage

    Query For Range Values Without Table

    Unfortunately, there is no relationship whatsoever between the ID and the year. In fact, every time the form is submitted, the starting ID will change but the years will not. I have never seen this type of query before so am unsure how to proceed or even if it's possible. The whole point is that...
  10. PCHomepage

    Query For Range Values Without Table

    Thank you for replying, Olaf. No, I don't want the ID to be the year as the ID needs to start incrementing at a specific value which is being generated by the PHP and is independent of the year. Also, the year needs to be within a range of probably 1899 to 1996. Ideally it shouldn't use a table...
  11. PCHomepage

    Query For Range Values Without Table

    I'm trying to come up with a query that will give me a range of years from a specific start to specific end, and then to auto-increment the list starting at another specific value. So far I've succeeded partially by getting the year values from an existing table but it does not have the full...
  12. PCHomepage

    Get Row Number in MySQLi

    Thank you, that is exactly what I was looking for!
  13. PCHomepage

    Get Row Number in MySQLi

    That's what I thought. I'm trying to create a function to provide the row number when run inside a loop so how would I do it? I'm not sure where to begin.
  14. PCHomepage

    Get Row Number in MySQLi

    How can I get the row number in a list of entries? It's not the number of rows in the result that I need: it is a line by line count of each one.
  15. PCHomepage

    Regular Expressions

    Yes, thank you, and no real rush. I did know that but I was expecting the regex to provide the date as a single variable using list() but instead it gives it in bits and pieces, which is the main issue here. When I first wrote the function it used a pattern something like: $pattern = '/^([^ ]+)...

Part and Inventory Search

Back
Top