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 = '/^([^ ]+)...
I'm trying to parse the apache.log file and have a function working that does so, but I know little about regex and could not parse it directly. I reviewd and tried just about every posting I could find here and on other sites but nothing worked. Please see $pattern below and can tell me how to...
I created a function to emulate the Apache access.log in MySQL and it is working but there are several things with which I need help. Any thoughts on the following?
The first is $status for which I created the GetStatus() function but when it is used, the server times out. Using the same code...
Yes, the logs are there but only as compressed .gz files and are compressed by month. Because it's a shared server with other clients, the actual logs are not available any other way which is why the hosting company offered to send me a copy. I suppose I could write a script to extract them to a...
I've created a relatively simple function to convert the Apache access.log file to MySQL, and the plan is to run it just once (if it doesn't time out!) per site to populate the table, then it won't need to be run again as the site will then keep the table up to date automatically with other...
I'm working on what should be a simple function to get the name of one of two California counties. However, on the line highlighted below, address_components[3] for one county gives the proper value but for other it needs to use address_components[4] to get the proper value.
That is, for one of...
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.