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...
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.
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...
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 =...
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...
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...
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...
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!)
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...
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...
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...
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.
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 = '/^([^ ]+)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.