Jump to content

chiprivers

Members
  • Posts

    468
  • Joined

  • Last visited

    Never

Everything posted by chiprivers

  1. ??? I have been looking for a script to display a calender / date picker within my web page to be able to select a date from. Different from the ones I have found, I want to be able jump back and forward through months / years without having to reload the page. I guess this will probably done using somthing client side such as javascript or CSS? Can anybody give poitn me to one or give me something to start from?
  2. I thought from the prvious posts that the first occurence of any records with the same value for x would be returned with the rest of the values in that same record, this by ordering the y column descening, that would mean the record with the highest value of y would be returned. Is this not right?? I know that for that exact example, the max(y) option may be simpler but in theory you you could use any rule to order the y column and control which value is returned.
  3. So what I could do, for the given example, is : SELECT x, y FROM table GROUP BY x ORDER BY x ASC, y DESC Would that give me one record for each unique value of x using the record that has the highest value for y??
  4. Is there a function / script that I can use to grab an image file from a given location and resave it in a local directory?
  5. Sorry but you have lost me, let me explain exactly what I want to do: in my previous example, column x will hold a name, column y will hold a score: col x col y Bob 100 John 150 Dan 200 Bob 150 Arthur 175 John 200 What I want to be able to do is return a name along with the highest score for that person, so I will use GROUP BY on col x to return only one row for each person but how do I select the highest value in col y for each person to be returned along with their name?
  6. Lets say that you have a table with two columns: x and y You pull a query: SELECT x, y FROM table GROUP BY x This will only return one record for each value of x, nut my question is which record does it use for the value of y? And can you select which record is used to return y using an ordering rule?
  7. I would like to have my page load to the browser and then wait 30 seconds before executing my javascript command to open a new window. I have tried looking at various javascript snippets to get this to work but all keeps failing, is there a real simple command that will just make the script pause for a given amount of time?
  8. Does anybody know if there is a limit set for the number of browser windows that can be open at once? I have a script that once complete opens a new window and reruns the script with a new variable, the problem is when I get to around 40 windows open it stops running!
  9. Is there a command that i can use to close all other open explorer windows?
  10. I'm a bit lost now, let me explain in what context I am using this and perhaps you could explain my options? I am dealing with horse racing results and I am extracting the data from the code source of a webpage. The section that lists the horses gives their finishing position which is obviously a numeric value. I am inserting this into a mysql database with a column type int. However, for some races, horses are also listed that did not complete the race and the value returned where there would normally be a numeric value is an abbreviation of letters indicating the reason that they did not finish the race, ie PU for pulled up. This value I can obviously not put into my current int column in the database. So I wanted to have a seperate varchar column in the database where I put an entry if the horse did not complete the race, hence I need to check whether the value taken from the script is numeric or not to know which column to put it into. Perhaps I am making this a lot more complex than I need to!
  11. Will this also work for: $var = '123'; as apposed to: $var = 123;
  12. What would be the correct syntax be to check if a given variable is not numeric?
  13. Perfect, thank you very much
  14. Within my current project, I have come across a slight hurdle for which I believe regex is the solution. I am working with horse racing results and I am currently trying to breakdown a string containing the race length into seperate numeric fields for miles furlongs and yards. The string is presented int he format: $race_distance = "1m4f100y"; Obviously the m, f and y represent miles, furlongs and yards respectively. I want to end up with three strings like this: $miles = 1; $furlongs = 4; $yards = 100; Note however that the numeric figures may be of differeing digit length, not always as the example, and also the string may not include miles, furlongs and yards; it may be: $race_distance = "1m"; which would require: $miles = 1; $furlongs = 0; $yards = 0; Could anybody please help me with a small script that would create these results? Many thanks.
  15. Is there a function that will return the part of a string the occurs between two specified bits of string? ie: $string = "abcdefghijklmnopqrstuvwxyz"; $new = function("abcde","rstuv",$string); $new now equals = "fghijklmnopq";
  16. I have posted already in the php help forum but this is probably a better place to ask! I am having trouble with a php script that is aborting giving a server overload error. Was wondering if there is any way to adjust the memory available to the server (or something similar) to prevent this from happening?
  17. Any suggestions? Is there a way that perhaps I need to adjust my apache server to allocate more memory or maybe something in the php script??
  18. Is there away to allocate more memory to the server? I am assuming this may resolve a problem I am having. When I run a script, I am getting the following error come up: "The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. " In the script it is grabbing the source code of a website to be able to extract some data from it. It cycles through several pages at a time and it seems to be overloading the server. When I run the script using the following URL as a source document: http://www.gg.com/racing/index.php?date=20070401 it works fine, but when I use the following page: http://www.gg.com/racing/view.php?id=52818 it overloads!! I presume the second page is larger and overloads the memory. How can I avoid this??
  19. Is there an easy way to display in my browser window all of the tables and their corresponding column names for a selected mysql database?
  20. I have a link in a form that opens a new window holding a list of names, I would like to be able to click on one of the names in the new window and it be entered into the form field of the original window. I have toyed around with some java script but I can not get it to work, can anyone help? I was expecting something like this in the new window link: < a href="#" onClick="parent.document.form_name.form_field.value = "value"; return false">Value</a>
  21. Im having trouble with a little bit of javascript if anybody could help, I don't really use it that often so I am probably making a really simple mistake! This is my script: <?php echo "<script language =\"JavaScript\">\n"; echo "document.body.style.backgroundColor=\"yellow\";\n"; $target = "data_grabber.php?sentDate=".date("Y-m-d",$date_plus_one); $window = date("Y-m-d",$date_plus_one); echo "window.open('".$target."','".$window."');\n"; echo "</script>"; ?> This is at the very end of my script and it is supposed to turn the page yellow (which it does) and then open up a new window, but it doesnt open the new window!
  22. The script is taking several minutes to process but flushes the display to the browser as it goes giving a progress of what is happening, I just wondered if I could get the bg to turn green at the end of the script just to give an indication that the script had finished!?
  23. Doesnt that need to be at the beginning of the script?
  24. Can anybody help me with a line of code that i can put at the very end of my script so that turns the background og my page green? I have quite a long script running and this work as an indication that the page had finished loading!
×
×
  • 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.