Jump to content

mausie

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mausie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is indeed possible. But then I would still get a 1mb query with all the ranges to test. Me and my team decided not to cache price ranges and let the system cache it when the user searches for it. Thanks for the help anyway!
  2. Hi all, I am working on a website where you can find a lot of objects in continents, countries with a specific price range. On the result page will be refine result options like choosing a other continent, country, type etc. At the end of these links will also be the number of results that would be found on this option Example: United Kingdom (40 000) instead of Spain you searched. Because I thought searching will be kind of heavy throwing a count for all possibilities I came up with the idea to create a cache table with all the possibilities and the number of counts. This would run once at night. Example table: continent country type minPrice maxPrice count 0 1 6 20 000 60 0000 990 Getting number of results of what someone searches is very easy this way. No counts. Just search country, minPrice and maxPrice and get the column count. This would speed up the searching by users a lot. ===== But now the hard part. Building this query to fill the table. Finding the results like per country and type aint hard. It will be just a group over country and type and count and insert into cache table as mentioned above. But the price ranges are a different story. For example the following prices are available on the form where you select minPrice and maxPrice on the website: 25,000 50,000 75,000 100,000 125,000 150,000 175,000 200,000 225,000 250,000 275,000 300,000 325,000 350,000 375,000 400,000 450,000 500,000 550,000 600,000 650,000 700,000 750,000 800,000 This means there are A LOT of possibilities people choose from. 25,000 – 50,000 25,000 – 75,000 etc 50,000 – 75,000 65,000 - 100,000 etc etc I’ve tried to search all possibilities between country, type and minPrice, maxPrice through PHP. But 25,000 queries will be executed. No success I’ve tried to build up a whole query that searches like: SELECT `country_id`, count(`id`) AS `count`, `price_data` BETWEEN 0 AND 25000 AS `0till25000`, `price_data` BETWEEN 0 AND 50000 AS `0till50000`, `price_data` BETWEEN 0 AND 500000 AS `0till500000`, `price_data` BETWEEN 0 AND 800000 AS `0till800000` FROM `table` GROUP BY `country_id`, `0till25000`, `0till50000`, `0till500000`, `0till800000`; etc with all possibilities But this query gets so big because of all the possibilities. MySQL won’t accept it. Does any1 know of any intelligence function by MySQL that can try all possibilities between 25,000 and 800,000 with specific steps? Or any other tips? Thanks in advance! Maurice
  3. Ok so cars holds all common functions. And car will be used for car objects (Set values etc) and then the update/del functions from car refer to the functions in cars. Right? Sounds very logic! I assume cars will be a static class then? Or should i create a object and pass it to the constructor of car?
  4. Hi all, I’ve got a question about OOP Classes and the best way to use ‘em. Mostly I use classes like car. $renault = new car(); Then you can Set values, Update the values to db with internal functions like $renault->setBrand. But I also want to get all cars from the db with a function to list ‘em all on my site. Should I create 2 classes then? Car and cars? (cars->getAllCars) And what if I have a class cars to use getAllCars. Is there a easy to to convert all received data into a Array with objects which are member of the class car? A other way is just the class cars with all functions like updateCar($id, $brand, etc). Im really wondering what’s the best way to build my applications! Thanks, Maurice
  5. Damn. I forgot $this on: $this->db = $dbObj; Feel so stupid :'( Thank you!
  6. Hi all, I’m rewriting a script of mine into PHP5 OOP. Even tho I have some difficults finding a good way. I have a Class for database connections/functions (clsDB) and a Class for Statistics (clsStats) So my question is, what’s the best way to use the DB functions within the Stats class? My main code says: $objDB = new clsDB(‘host’,'user','pass','db'); $stats = new clsStats(); In my clsStats class there are alot of functions that use queries. They have to go through clsDB and if you ask me, through $objDB. (That makes sense to ME) But I can't access $objDB from my Stats class. Which is pretty logic caus it ain’t a member variable within that class. I can use a __constructor on clsStats so I pass the $objDB into the Stats object I’ll create. That would look like this: $objDB = new clsDB(‘host’,'user','pass','db'); $stats = new clsStats($objDB); But I can’t access any function through $this->objDB->function(); then. It just doesn’t recognize it anymore. Even when I only pass the memory (&). I could make my Database Class Static. But that makes no sense if you ask me. Because I would use query functions whit out using a object which has all the connections in it. Could you guys and girlie's help me with this? Thanks!
  7. Why use a foreach loop within the while loop?
  8. Thanks for the help. Even though I couldn't get your script to work. It made a .csv file but it was a bit messed up. I didn't understand the code either :( So I've searched for a alternative and not really found a method for this but the parameter " .= " .Which I totally forgotten. I've started build something with that in mind and it works :D Here's the code if you're interested: [code]<?php $data = $_GET['names'].',<br />'.$year.'<br /><br />';  $data .= 'Datum,'; foreach ($ids as $id) { $data .= $id.',';      } $data .= '<br />'; foreach (array_keys($array) as $arr) { $data .= $arr.',';  foreach ($ids as $id) {     if(!$array[$arr][$id])           $data .= ',';                 else {             if ($_GET['notation'] == minutes)                   $data .= $array[$arr][$id].',';                          else                       $data .= tohours($array[$arr][$id]).',';                  }     } $data .= '<br />';  }      unlink('sheet.csv'); $filename = 'sheet.csv'; $fp = fopen($filename,"a"); // $fp is now the file pointer to file $filename if($fp){     fwrite($fp,str_replace("<br />","\n",$data));    //    Write information to the file     fclose($fp);  //    Close the file } else {     echo "Cannot create csv file"; } ?>[/code]
  9. Be patient . There might be delay on the server and you'll get alota emails shortly :p
  10. Not sure I really get it but I think it should be: [code]for ($i = 0; $i <= (($_SESSION['no_of_pages'])+2); $i++) {     $page_name = $_POST['page_name[$i]'];     echo "".$page_name; } [/code] why use $i on page_name? Arrays are zero based. Start at 0. Hope this helps you. If not, sorry that I might of misunderstood your code.
  11. Hi, I'm working a page that generates data format so Exel .csv can read it. This is a last part of my code: [code]$ids = array('rechtvak', 'rechtadv', 'opgebcomp', 'opgebflex', 'vakantie', 'adv', 'compverlof', 'flextijd', 'berekend', 'gewerkt', 'dienstreis', 'thuiswerk', 'feestdag', 'cursus', 'varen', 'werktijdaanboord', 'bv', 'calverlof', 'studieverlof', 'ouderschapsverlof', 'zorgverlof', 'dokter', 'ziek', 'zwangerschapsverlof', 'tijdvoortijd', 'voorwerk', 'nawerk', 'meerwerk'); print 'Datum,'; foreach ($ids as $id) { print $id.',';      } print '<br />'; foreach (array_keys($array) as $arr) { print $arr.',';  foreach ($ids as $id) {     if(!$array[$arr][$id])           print ',';                 else {             if ($_GET['notation'] == minutes)                   print $array[$arr][$id].',';                          else                         print tohours($array[$arr][$id]).',';                  }     } print '<br />';  }     }    ?>[/code] You probably don't get it. But that's not importand. This is the output: [code]<name>, <lastname>,,,,,,,,,,,,,,,,,,,,,,,,,,, 2005,,,,,,,,,,,,,,,,,,,,,,,,,,,, Datum,rechtvak,rechtadv,opgebcomp,opgebflex,vakantie,adv,compverlof,flextijd,berekend,gewerkt,dienstreis,thuiswerk,feestdag,cursus,varen,werktijdaanboord,bv,calverlof,studieverlof,ouderschapsverlof,zorgverlof,dokter,ziek,zwangerschapsverlof,tijdvoortijd,voorwerk,nawerk,meerwerk 02/01/05,338:00:00,,,,,,,,,,,,,,,,,,,,,,,,,,, 03/01/05,,,,,,,,,08:47,08:47,,,,,,,,,,,,,,,,,, 04/01/05,,,,,,,,,08:48,08:48,,,,,,,,,,,,,,,,,, 05/01/05,,,,,,,,,09:03,09:03,,,,,,,,,,,,,,,,,, 06/01/05,,,,,,,,,09:15,09:15,,,,,,,,,,,,,,,,,,00:11 07/01/05,,,,,,,,,08:36,08:36,,,,,,,,,,,,,,,,,, 10/01/05,,,,,,,,,07:12,07:12,,,,,,,,,,,,,,,,,00:04, 11/01/05,,,,,,,,,08:12,08:12,,,,,,,,,,,,,,,,,, 12/01/05,,,,,,,,,03:25,03:25,,,,,,,,,,,,,,,,,, 13/01/05,,,,,,,,,08:01,08:01,,,,,,,,,,,,,,,,,, 14/01/05,,,,,,,,,06:58,06:58,,,,,,,,,,,,,,,,,, 17/01/05,,,,,,,,,08:33,08:33,,,,,,,,,,,,,,,,,, 18/01/05,,,,,,,,,09:02,09:02,,,,,,,,,,,,,,,,,, 19/01/05,,,,,,,,,08:57,08:57,,,,,,,,,,,,,,,,,, 20/01/05,,,,,,,,,09:15,,09:15,,,,,,,,,,,,,,,,, 21/01/05,,,,,,,,,07:53,07:53,,,,,,,,,,,,,,,,,, 22/01/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:40 24/01/05,,,,,,,,,01:05,01:05,,,,,,,,,,,,,,,,,, 25/01/05,,,,,,,,,06:53,06:53,,,,,,,,,,,,,,,,,, 26/01/05,,,,,,,,,07:30,07:30,,,,,,,,,,,,,,,,,, 27/01/05,,,,,,,,,08:10,08:10,,,,,,,,,,,,,,,,,, 28/01/05,,,,,,,,,07:36,07:36,,,,,,,,,,,,,,,,,, 29/01/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:13 30/01/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:08 31/01/05,,,,,,,,,07:34,07:34,,,,,,,,,,,,,,,,,00:03, 01/02/05,,,,,,,,,08:37,08:37,,,,,,,,,,,,,,,,,, 02/02/05,,,,,,,,,08:29,08:29,,,,,,,,,,,,,,,,,, 03/02/05,,,,,,,,,07:33,07:33,,,,,,,,,,,,,,,,,, 04/02/05,,,,,,,,,08:09,08:09,,,,,,,,,,,,,,,,,, 08/02/05,,,,,,,,,09:55,01:55,08:00,,,,,,,,,,,,,,,,, 09/02/05,,,,,,,,,08:10,08:10,,,,,,,,,,,,,,,,,, 10/02/05,,,,,,,,,07:57,07:57,,,,,,,,,,,,,,,,,, 11/02/05,,,,,,,,,08:49,08:49,,,,,,,,,,,,,,,,,, 12/02/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:05 14/02/05,,,,,,,,,08:34,08:34,,,,,,,,,,,,,,,,,, 15/02/05,,,,,,,,,08:49,08:49,,,,,,,,,,,,,,,,,, 16/02/05,,,,,,,,,06:13,06:13,,,,,,,,,,,,,,,,,, 17/02/05,,,,,,,,,08:03,08:03,,,,,,,,,,,,,,,,,, 18/02/05,,,,,,,,,08:02,08:02,,,,,,,,,,,,,,,,,, 21/02/05,,,,,,,,,08:02,08:02,,,,,,,,,,,,,,,,,, 22/02/05,,,,,,,,,08:43,08:43,,,,,,,,,,,,,,,,,, 23/02/05,,,,,,,,,09:02,09:02,,,,,,,,,,,,,,,,,, 24/02/05,,,,,,,,,08:50,08:50,,,,,,,,,,,,,,,,,, 25/02/05,,,,,,,,,08:40,08:40,,,,,,,,,,,,,,,,,, 28/02/05,,,,,,,,,08:57,08:57,,,,,,,,,,,,,,,,,00:03, 21/03/05,,,,,,,,,08:29,08:29,,,,,,,,,,,,,,,,,, 22/03/05,,,,,,,,,08:45,08:45,,,,,,,,,,,,,,,,,, 23/03/05,,,,,,,,,07:35,07:35,,,,,,,,,,,,,,,,,, 24/03/05,,,,,,,,,09:02,09:02,,,,,,,,,,,,,,,,,, 25/03/05,,,,,,,,,08:00,,,,08:00,,,,,,,,,,,,,,, 28/03/05,,,,,,,,,08:00,00:04,,,07:56,,,,,,,,,,,,,,, 29/03/05,,,,,,,,,07:58,07:58,,,,,,,,,,,,,,,,,, 30/03/05,,,,,,,,,08:23,08:23,,,,,,,,,,,,,,,,,, 01/04/05,,,,,,,,,07:22,07:22,,,,,,,,,,,,,,,,,, 04/04/05,,,,,,,,,07:57,07:57,,,,,,,,,,,,,,,,,, 05/04/05,,,,,,,,,08:05,08:05,,,,,,,,,,,,,,,,,, 06/04/05,,,,,,,,,07:53,07:53,,,,,,,,,,,,,,,,,, 07/04/05,,,,,,,,,09:02,09:02,,,,,,,,,,,,,,,,,, 08/04/05,,,,,,,,,07:45,07:45,,,,,,,,,,,,,,,,,, 10/04/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:13 11/04/05,,,,,,,,,08:06,08:06,,,,,,,,,,,,,,,,,, 12/04/05,,,,,,,,,07:48,07:48,,,,,,,,,,,,,,,,,, 13/04/05,,,,,,,,,08:00,03:58,,02:00,,,,,,02:02,,,,,,,,,, 14/04/05,,,,,,,,,03:53,03:53,,,,,,,,,,,,,,,,,, 15/04/05,,,,,,,,,06:40,06:40,,,,,,,,,,,,,,,,,, 18/04/05,,,,,,,,,05:19,05:19,,,,,,,,,,,,,,,,,, 19/04/05,,,,,,,,,07:06,07:06,,,,,,,,,,,,,,,,,, 20/04/05,,,,,,,,,08:20,08:20,,,,,,,,,,,,,,,,,, 21/04/05,,,,,,,,,08:06,08:06,,,,,,,,,,,,,,,,,, 22/04/05,,,,,,,,,07:07,07:07,,,,,,,,,,,,,,,,,, 25/04/05,,,,,,,,,07:23,07:23,,,,,,,,,,,,,,,,,, 26/04/05,,,,,,,,,07:41,07:41,,,,,,,,,,,,,,,,,, 27/04/05,,,,,,,,,08:27,08:27,,,,,,,,,,,,,,,,,, 29/04/05,,,,,,,,,07:59,07:59,,,,,,,,,,,,,,,,,, 01/05/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:09 02/05/05,,,,,,,,,08:00,,08:00,,,,,,,,,,,,,,,,, 03/05/05,,,,,,,,,09:09,09:09,,,,,,,,,,,,,,,,,, 04/05/05,,,,,,,,,08:40,08:40,,,,,,,,,,,,,,,,,, 05/05/05,,,,,,,,,08:00,,,,08:00,,,,,,,,,,,,,,, 07/05/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:40 09/05/05,,,,,,,,,05:48,05:48,,,,,,,,,,,,,,,,,, 10/05/05,,,,,,,,,00:32,00:32,,,,,,,,,,,,,,,,,, 11/05/05,,,,,,,,,08:25,08:25,,,,,,,,,,,,,,,,,, 12/05/05,,,,,,,,,08:25,08:25,,,,,,,,,,,,,,,,,, 13/05/05,,,,,,,,,04:54,04:54,,,,,,,,,,,,,,,,,, 16/05/05,,,,,,,,,08:00,,,,08:00,,,,,,,,,,,,,,, 17/05/05,,,,,,,,,07:40,07:40,,,,,,,,,,,,,,,,,, 18/05/05,,,,,,,,,08:21,08:21,,,,,,,,,,,,,,,,,, 19/05/05,,,,,,,,,07:58,07:58,,,,,,,,,,,,,,,,,, 20/05/05,,,,,,,,,08:29,08:29,,,,,,,,,,,,,,,,,, 21/05/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:47 23/05/05,,,,,,,,,07:07,07:07,,,,,,,,,,,,,,,,,, 24/05/05,,,,,,,,,08:01,08:01,,,,,,,,,,,,,,,,,, 25/05/05,,,,,,,,,08:04,08:04,,,,,,,,,,,,,,,,,, 26/05/05,,,,,,,,,08:15,08:15,,,,,,,,,,,,,,,,,, 27/05/05,,,,,,,,,04:16,04:16,,,,,,,,,,,,,,,,,, 28/05/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:19 31/05/05,,,,,,,,,07:58,07:58,,,,,,,,,,,,,,,,,, 01/06/05,,,,,,,,,08:40,08:40,,,,,,,,,,,,,,,,,, 02/06/05,,,,,,,,,08:11,08:11,,,,,,,,,,,,,,,,,, 03/06/05,,,,,,,,,08:32,08:32,,,,,,,,,,,,,,,,,, 05/06/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:13 06/06/05,,,,,,,,,08:05,08:05,,,,,,,,,,,,,,,,,, 07/06/05,,,,,,,,,08:18,08:18,,,,,,,,,,,,,,,,,, 08/06/05,,,,,,,,,08:23,08:23,,,,,,,,,,,,,,,,,, 09/06/05,,,,,,,,,08:34,08:34,,,,,,,,,,,,,,,,,, 10/06/05,,,,,,,,,08:51,08:51,,,,,,,,,,,,,,,,,, 13/06/05,,,,,,,,,05:27,05:27,,,,,,,,,,,,,,,,,, 14/06/05,,,,,,,,,08:17,08:17,,,,,,,,,,,,,,,,,, 15/06/05,,,,,,,,,08:07,08:07,,,,,,,,,,,,,,,,,, 16/06/05,,,,,,,,,07:57,07:57,,,,,,,,,,,,,,,,,00:03, 17/06/05,,,,,,,,,07:02,07:02,,,,,,,,,,,,,,,,,, 20/06/05,,,,,,,,,08:22,08:22,,,,,,,,,,,,,,,,,, 21/06/05,,,,,,,,,08:22,08:22,,,,,,,,,,,,,,,,,, 22/06/05,,,,,,,,,08:50,08:50,,,,,,,,,,,,,,,,,, 23/06/05,,,,,,,,,08:32,08:32,,,,,,,,,,,,,,,,,, 24/06/05,,,,,,,,,08:11,08:11,,,,,,,,,,,,,,,,,, 27/06/05,,,,,,,,,06:57,06:57,,,,,,,,,,,,,,,,,, 28/06/05,,,,,,,,,08:14,08:14,,,,,,,,,,,,,,,,,, 29/06/05,,,,,,,,,08:15,08:15,,,,,,,,,,,,,,,,,, 30/06/05,,,,,,,,,09:00,09:00,,,,,,,,,,,,,,,,,00:08, 01/07/05,,,,,,,,,11:21,11:21,,,,,,,,,,,,,,,,,01:54,01:02 02/07/05,,,,,,,,,12:33,12:33,,,,,,,,,,,,,,,,,,12:33 03/07/05,,,,,,,,,08:22,08:22,,,,,,,,,,,,,,,,,,08:22 04/07/05,,,,,,,,,09:34,09:34,,,,,,,,,,,,,,,,,, 05/07/05,,,,,,,,,09:14,09:14,,,,,,,,,,,,,,,,,, 06/07/05,,,,,,,,,09:14,09:14,,,,,,,,,,,,,,,,,, 07/07/05,,,,,,,,,08:56,08:56,,,,,,,,,,,,,,,,,, 08/07/05,,,,,,,,,06:16,06:16,,,,,,,,,,,,,,,,,, 10/07/05,,,,,,,,,04:26,04:26,,,,,,,,,,,,,,,,,,04:26 11/07/05,,,,,,,,,08:45,08:45,,,,,,,,,,,,,,,,,, 12/07/05,,,,,,,,,08:57,08:57,,,,,,,,,,,,,,,,,, 13/07/05,,,,,,,,,06:56,06:56,,,,,,,,,,,,,,,,00:04,, 14/07/05,,,,,,,,,09:15,09:15,,,,,,,,,,,,,,,,,,00:11 15/07/05,,,,,,,,,08:42,08:42,,,,,,,,,,,,,,,,,, 18/07/05,,,,,,,,,08:16,08:16,,,,,,,,,,,,,,,,,, 19/07/05,,,,,,,,,08:27,08:27,,,,,,,,,,,,,,,,00:02,, 20/07/05,,,,,,,,,08:59,08:59,,,,,,,,,,,,,,,,,, 21/07/05,,,,,,,,,09:15,09:15,,,,,,,,,,,,,,,,00:06,,00:16 22/07/05,,,,,,,,,07:43,07:43,,,,,,,,,,,,,,,,,, 25/07/05,,,,,,,,,06:17,06:17,,,,,,,,,,,,,,,,,, 26/07/05,,,,,,,,,08:51,08:51,,,,,,,,,,,,,,,,,, 27/07/05,,,,,,,,,05:43,05:43,,,,,,,,,,,,,,,,,, 28/07/05,,,,,,,,,05:55,05:55,,,,,,,,,,,,,,,,,, 01/08/05,,,,,,,,,07:55,07:55,,,,,,,,,,,,,,,,,, 02/08/05,,,,,,,,,08:38,08:38,,,,,,,,,,,,,,,,,, 03/08/05,,,,,,,,,08:51,08:51,,,,,,,,,,,,,,,,,, 04/08/05,,,,,,,,,,,,,,,,,,,,,,,,,,,00:06, 05/08/05,,,,,,,,,06:33,06:33,,,,,,,,,,,,,,,,,, 08/08/05,,,,,,,,,08:55,08:55,,,,,,,,,,,,,,,,00:03,, 09/08/05,,,,,,,,,07:10,07:10,,,,,,,,,,,,,,,,,, 10/08/05,,,,,,,,,07:27,04:34,,02:53,,,,,,,,,,,,,,,, 11/08/05,,,,,,,,,07:35,03:02,,04:33,,,,,,,,,,,,,,,, 12/08/05,,,,,,,,,09:15,09:15,,,,,,,,,,,,,,,,,,00:11 15/08/05,,,,,,,,,07:14,07:14,,,,,,,,,,,,,,,,,, 16/08/05,,,,,,,,,08:46,08:46,,,,,,,,,,,,,,,,,, 17/08/05,,,,,,,,,07:41,07:41,,,,,,,,,,,,,,,,,, 18/08/05,,,,,,,,,06:47,06:47,,,,,,,,,,,,,,,,,, 19/08/05,,,,,,,,,06:06,06:06,,,,,,,,,,,,,,,,,, 26/08/05,,,,,,,,,05:45,05:45,,,,,,,,,,,,,,,,,, 27/08/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:04 31/08/05,,,,,,,,,08:24,08:24,,,,,,,,,,,,,,,,,, 01/09/05,,,,,,,,,07:14,07:14,,,,,,,,,,,,,,,,,, 02/09/05,,,,,,,,,06:39,06:39,,,,,,,,,,,,,,,,,, 04/09/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,01:00 05/09/05,,,,,,,,,08:16,08:16,,,,,,,,,,,,,,,,,, 06/09/05,,,,,,,,,08:17,08:17,,,,,,,,,,,,,,,,,, 07/09/05,,,,,,,,,06:50,06:50,,,,,,,,,,,,,,,,,00:03, 08/09/05,,,,,,,,,06:33,06:33,,,,,,,,,,,,,,,,,, 09/09/05,,,,,,,,,06:51,06:51,,,,,,,,,,,,,,,,,, 12/09/05,,,,,,,,,06:52,06:52,,,,,,,,,,,,,,,,,, 13/09/05,,,,,,,,,07:07,07:07,,,,,,,,,,,,,,,,,, 14/09/05,,,,,,,,,06:40,06:40,,,,,,,,,,,,,,,,,, 15/09/05,,,,,,,,,06:48,06:48,,,,,,,,,,,,,,,,,, 16/09/05,,,,,,,,,04:23,04:23,,,,,,,,,,,,,,,,,, 19/09/05,,,,,,,,,06:36,06:36,,,,,,,,,,,,,,,,,, 20/09/05,,,,,,,,,05:10,05:10,,,,,,,,,,,,,,,,,, 21/09/05,,,,,,,,,05:19,05:19,,,,,,,,,,,,,,,,,, 22/09/05,,,,,,,,,05:53,05:53,,,,,,,,,,,,,,,,,, 23/09/05,,,,,,,,,07:54,07:54,,,,,,,,,,,,,,,,,, 25/09/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:33 26/09/05,,,,,,,,,06:51,06:51,,,,,,,,,,,,,,,,,, 27/09/05,,,,,,,,,07:18,07:18,,,,,,,,,,,,,,,,,, 28/09/05,,,,,,,,,06:42,06:42,,,,,,,,,,,,,,,,,, 29/09/05,,,,,,,,,04:02,04:02,,,,,,,,,,,,,,,,,, 01/10/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:08 03/10/05,,,,,,,,,07:22,07:22,,,,,,,,,,,,,,,,,, 04/10/05,,,,,,,,,07:24,07:24,,,,,,,,,,,,,,,,,, 05/10/05,,,,,,,,,06:45,06:45,,,,,,,,,,,,,,,,,, 06/10/05,,,,,,,,,06:21,06:21,,,,,,,,,,,,,,,,,, 10/10/05,,,,,,,,,07:23,07:23,,,,,,,,,,,,,,,,,, 11/10/05,,,,,,,,,09:00,,09:00,,,,,,,,,,,,,,,,, 12/10/05,,,,,,,,,04:32,04:32,,,,,,,,,,,,,,,,,, 13/10/05,,,,,,,,,08:48,08:48,,,,,,,,,,,,,,,,,, 14/10/05,,,,,,,,,03:53,03:53,,,,,,,,,,,,,,,,,, 17/10/05,,,,,,,,,07:56,07:56,,,,,,,,,,,,,,,,,, 18/10/05,,,,,,,,,07:01,07:01,,,,,,,,,,,,,,,,,, 19/10/05,,,,,,,,,04:10,04:10,,,,,,,,,,,,,,,,,, 20/10/05,,,,,,,,,07:03,07:03,,,,,,,,,,,,,,,,,, 21/10/05,,,,,,,,,07:18,07:18,,,,,,,,,,,,,,,,,, 23/10/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:13 30/10/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:16 31/10/05,,,,,,,,,07:11,07:11,,,,,,,,,,,,,,,,,, 01/11/05,,,,,,,,,07:03,07:03,,,,,,,,,,,,,,,,,, 02/11/05,,,,,,,,,05:53,05:53,,,,,,,,,,,,,,,,,, 03/11/05,,,,,,,,,06:17,06:17,,,,,,,,,,,,,,,,,, 04/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 07/11/05,,,,,,,,,05:20,05:20,,,,,,,,,,,,,,,,,, 08/11/05,,,,,,,,,06:45,06:45,,,,,,,,,,,,,,,,,, 09/11/05,,,,,,,,,06:31,06:31,,,,,,,,,,,,,,,,,, 10/11/05,,,,,,,,,08:00,,08:00,,,,,,,,,,,,,,,,, 11/11/05,,,,,,,,,04:20,04:20,,,,,,,,,,,,,,,,,, 14/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 15/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 16/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 17/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 18/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 19/11/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,00:56 21/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 22/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 23/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,00:24, 24/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 25/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 26/11/05,,,,,,,,,,,,,,,,,,,,,,,,,,,,01:06 28/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 29/11/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,00:42, 30/11/05,,,,,,,,,08:00,03:14,,,,,,,,,,,,,04:46,,,,, 01/12/05,,,,,,,,,08:00,03:18,,,,,,,,,,,,,04:42,,,,, 02/12/05,,,,,,,,,08:00,03:15,,,,,,,,,,,,,04:45,,,,00:31, 05/12/05,,,,,,,,,08:00,03:56,,,,,,,,,,,,,04:04,,,,, 06/12/05,,,,,,,,,08:00,06:10,,,,,,,,,,,,,01:50,,,,, 07/12/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 08/12/05,,,,,,,,,08:00,04:36,,,,,,,,,,,,,03:24,,,,, 09/12/05,,,,,,,,,08:00,07:06,,,,,,,,,,,,,00:54,,,,, 12/12/05,,,,,,,,,08:00,07:47,,,,,,,,,,,,,00:13,,,,, 13/12/05,,,,,,,,,08:00,05:55,,,,,,,,,,,,,02:05,,,,, 14/12/05,,,,,,,,,08:00,05:22,,,,,,,,,,,,,02:38,,,,, 15/12/05,,,,,,,,,08:00,05:49,,,,,,,,,,,,,02:11,,,,, 16/12/05,,,,,,,,,08:00,05:19,,,,,,,,,,,,,02:41,,,,, 19/12/05,,,,,,,,,08:00,,,,,,,,,,,,,,08:00,,,,, 20/12/05,,,,,,,,,08:00,04:05,,,,,,,,,,,,,03:55,,,,, 21/12/05,,,,,,,,,08:00,05:45,,,,,,,,,,,,,02:15,,,,, 22/12/05,,,,,,,,,08:00,06:33,,,,,,,,,,,,,01:27,,,,, 23/12/05,,,,,,,,,08:00,03:46,,,,,,,,,,,,,04:14,,,,, 26/12/05,,,,,,,,,08:00,,,,08:00,,,,,,,,,,,,,,, 27/12/05,,,,,,,,,,,,,,,,,,,,,,,,,,,05:00,01:15 30/12/05,,,,,,,,,03:00,03:00,,,,,,,,,,,,,,,,,, 31/12/05,,,,,296:25:00,,,,296:25:00,,,,,,,,,,,,,,,,,,, [/code] This will be a nice table in Exel if you copy/paste it to a file and rename to .csv. Even tho, I want to make a file on the server including this all so it can be downloaded by 1 click. So my question is, how can I get all these data that's being 'printed' on my screen in a var to get it into a fwrite? Hope I get some answers, I'll be back to try it out after the weekend :) Thanks in advance and have a great weekend, Maurice
  12. Thanks wildteen88. That works! But still I don't get why it removes lines from my string I made myself. Oh well :P Anyway all thanks for helping me :)
  13. Ok that works but I can't get it into my link :/ I do print $bla It shows: /file:/C:/Documents and Settings/mvdstar/My Documents/SQL_PHP/Index2.php?nameinput=&names=Star%2C+Maurice+van+der&year=2006&Results=Results&print=1 I got $bla in <a href. The link (Firefox) shows: /file:/C:/Documents and Settings/mvdstar/My Documents/SQL_PHP/Index2.php?nameinput=&names=Star%2C+Maurice+van+der&year=2006&Results=Results it automaticly removes print And explorer shows: http://HOST/file:/C:/Documents%20and%20Settings/mvdstar/My%20Documents/SQL_PHP/ ??? I don't get that. I'm forcing it to use a string as link and it somehow removes parts automaticly.
  14. Hi, I'm working on a page that reads data of people from an database. I got a form working on GET method so all vars will be nicely in the address bar when submit. I want to add a print function. So when the page loads it will check if "Print version" (print == 1) has been clicked and it will show that content instead of the color content. The link contains PHP_SELF with ?print=1 But... all other vars that were in the address bar are gone when clicked. So the new form get's all kinds of SQL errors. How could I fix this? Putting all GETS in a $var first. Or will it delete those contents too when PHP_SELF is called. Or Are there other techniques? Maurice
  15. Darn that's some logic thinking I've missed. Many thanks for your help and extremely fast reply! grtz
×
×
  • 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.