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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  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 = '/^([^ ]+)...
  16. PCHomepage

    Regular Expressions

    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...
  17. PCHomepage

    Access.log to MySQL

    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...
  18. PCHomepage

    Parse Apache access.log Eliminate Spiders and Bots

    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...
  19. PCHomepage

    Parse Apache access.log Eliminate Spiders and Bots

    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...
  20. PCHomepage

    Google API Result Inconsistency

    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...

Part and Inventory Search

Back
Top