Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Awful lot of functions that don't do much more than the simple line of code could do for you. The message simply means you don't have the same number of arguments bound to the query as you have symbolic parms in .the query statement. As said - echo out the query statement being prepare and then do a print_r on the parms and make sure you have matching counts.
  2. My opinion is to keep from switching in and out of php mode entirely. If you have multiple lines of this kind of code, explore the usage of the heredoc feature in the manual. Much easier to read when you have a lot of this sort of coding going on.
  3. Hmmm. I don't think you need the AND in the order by but it still doesn't make sense.
  4. Increase the speed? It's still on the server! How does that speed things up - it still has to download. And having a cache to pull a page from that is technically out-of-date is not a good thing. Think about it. If you didn't have this cache this post would never have happened. Think about this. What if your url points to a script (which this one does) that produces different outputs? How does this cache work in that case when your url request wants "page2" sent to the client instead of the normal "page1" sent?
  5. Again - don't know joomla and have no idea what is does for you. I don't understand the need for a server-side cache. Caches that I am used to are on the client in order to save repeated downloads from the server when un-necessary. Having one on the server isn't saving anything and in a case like this interferes with the performance of a dynamic php script. Turn off the cache.
  6. If you continue to think this is related to joomla, I suggest you post in a joomla forum (cms)
  7. What does this line mean: 'Without update the cache and in that page'? What does that mean? Are you trying to say that you edited the page, put it back on the server and then executed the same url call again?
  8. Does your page present any kind of selection page for the user to decide what is to be done? When the page first loads, retrieve the cookies and either display them on the page you first show, or hide them on the page, or just run the query with them. If there are no cookies I would modify the script to send a first screen that asks the user to make his filter choices and then create the cookies and then run the query.
  9. You probably don't realize that your first call to query() runs the query and so does your second. The if statement is a wise thing to do to evaluate if your query runs, but don't run it the first time because the if is going to run it again. Dump the first call. And of course, as Mac_gyver says, one doesn't maintain a total in a database. One designs it to record the details and than obtains a count/total/sum when on needs it by doing a quick summary query. Does your system register the occupants of the seats in each class? If so, then you already have your answer for total seats used.
  10. The code you posted above is a blob of unreadable code.
  11. When you post your next set of code, kindly make it more readable. NOBODY codes without breaking it into separate lines.
  12. And THAT is exactly what I said from the start. And in my last post. The data returned is your responsibility to output, no? So - you decide what to output. Don't forget to add the missing line in your error reporting code from my signature
  13. 1 - see my signature for the proper use of error reporting. 2 - looking at the explanation you gave it would seem that YOU are doing the display using data passed back . I don't know what a "jquery carousel" is but if the data comes back to you then you determine what you output. Simple as that.
  14. No.
  15. "How to make" the contact form php? Uh - you "Learn" how to write the code? Then you ask for help with the parts that you haven 't quite learned yet and we help you to finish learning it. Since your topic title was so delightfully empty of any meaningful information, I guess it could also double as a flat out request for a programmer to do your work for you. In that case you should post in a different forum.
  16. But every year you have to "alter" the code to set your new dates. With a db-driven script you could expand it to do more than holidays. You could add your vacation schedule to it. A birthday list. A reminder list. Simply add a date, a name, a greeting, etc. and voila - a reminder pops up.
  17. Db would be much much easier to keep up to date. No coding - just d/e
  18. My first improvement would be to use a db and store the upcoming holidays as dates with attributes for all the things you set for each one. Then I would take today's date and use the date interval functions to add 7 days to it and then query the db for that date range and grab all the other items stored for that date. One record per date would be all you need. PS - how do you handle it when two holidays fall inside the same 7 day window?
  19. ok - I don't know what all this code is. What you have said is that a page displays a series of videos and the user clicks on one. That click triggers a php script that displays the viewer page that allows the user to see his chosen video. So - what is all this code? Is this the script that is triggered by the click? And why is the code to record the count all the way down at line 3xx? Why not at the top since you know it has to happen. Do this. Comment out the counter code and add an echo saying "Just hit the counter code" and then exit. That will be proof that you hit the counter code every time you view your page and select a video. Also - what is the filename of each of these two files you posted?
  20. The cached page showed you PHP code? I don't know anything about Joomla but having a joomla cache on the server to hold php scripts makes no sense to me. And you're saying that the counter script doesn't appear? What counter script? Isn't your counter code simply a call to some function that is included in your php script? Could you post the start of your php script so we can see what you are doing and how you are doing the counter code in a failsafe manner?
  21. That post means nothing to me. What about what I last posted? How do you answer that?
  22. Highlight the entire script and look for colored areas with no visible chars in them
  23. No it doesn't. Does the API that you call (1) actually generate this display, or do you (2)do the displaying. If 1 - the api has to be aware of your "new" query item in order to affect the behavior. If 2 - Of course you can!
  24. You have some extra hidden chars at the end of this line right before $ratio_orig is ref'ed list($width_orig, $height_orig) = getimagesize($imgSrc);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.