Jump to content

flyerball10

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

flyerball10's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thats what I'm thinking is wrong. Is there a way to find out where the correct httpd.conf is being loaded from?
  2. I need to parse php with HTML pages on my site. I have access to the httpd.conf file and have added the following the .conf file: AddType application/x-httpd-php .php .html I restarted Apache and tested the following HTML: <html> <head></head> <body> <h1> <?php echo "I LOVE PHP!"; ?> </h1> </body> </html> Nothing....No results...No parsing!! Any thoughts?? Anyone? PLEASE HELP
  3. try this code and link. the code below sets the variable $url to 'index2.php'. if there are any parameters on that page (option, task, id, etc..) it will add them to the url. $url = "index.2.php"; if (isset($_SERVER['QUERY_STRING'])) { $url .= (strpos($url, '?')) ? "&" : "?"; $url .= $_SERVER['QUERY_STRING']; } <a href='javascript:void(0)' onclick="window.open('<?php echo $url; ?>','win2','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,resizable=yes,width=540,height=440,directories=no,location=no');"'><img src="images/M_images/sendafriend2.png" alt="Send To A Friend" name="Print" height="19" border="0" align="middle" /></a>
  4. I figured it out....in case anyone is interested.... mysql> SELECT destination_url, -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '07-2007', 1, 0)) AS "JUL 2007", -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '06-2007', 1, 0)) AS "JUN 2007", -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '05-2007', 1, 0)) AS "MAY 2007", -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '04-2007', 1, 0)) AS "APR 2007", -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '03-2007', 1, 0)) AS "MAR 2007", -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '02-2007', 1, 0)) AS "FEB 2007", -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '01-2007', 1, 0)) AS "JAN 2007", -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '12-2006', 1, 0)) AS "DEC 2006", -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '11-2006', 1, 0)) AS "NOV 2006", -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '10-2006', 1, 0)) AS "OCT 2006", -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '09-2006', 1, 0)) AS "SEP 2006", -> SUM(IF(DATE_FORMAT(datetime, '%m-%Y') = '08-2006', 1, 0)) AS "AUG 2006" -> FROM click -> WHERE site_id = 8 AND datetime >= '2006-08-01' -> GROUP BY destination_url -> ORDER BY 'JUN 2007' DESC -> LIMIT 15; +-------------------------------------------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ | destination_url | JUL 2007 | JUN 2007 | MAY 2007 | APR 2007 | MAR 2007 | FEB 2007 | JAN 2007 | DEC 2006 | NOV 2006 | OCT 2006 | SEP 2006 | AUG 2006 | +-------------------------------------------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ | http://www.alconox.com | 46 | 63 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 53 | 70 | | http://www.atperpg.com | 34 | 53 | 82 | 85 | 22 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | http://www.ManufacturingWeek.com/medical | 30 | 44 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | http://www.BIOMEDeviceShow.com | 25 | 44 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | http://www.minco.com/DesignGuide | 31 | 40 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | http://www.idex-hs.com/catalog | 20 | 34 | 35 | 36 | 8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | http://www.newageindustries.com/canon | 30 | 33 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | http://www.caplugs.com | 15 | 30 | 56 | 43 | 25 | 15 | 7 | 21 | 8 | 5 | 10 | 9 | | http://www.southco.com/EASoffer2 | 36 | 29 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | http://www.tempco.com | 16 | 27 | 29 | 28 | 21 | 10 | 6 | 10 | 8 | 4 | 6 | 6 | | http://www.exaltcustomtubing.com | 13 | 24 | 0 | 0 | 21 | 20 | 16 | 12 | 7 | 8 | 20 | 22 | | http://www.seamcraft.com | 14 | 24 | 28 | 27 | 20 | 8 | 8 | 10 | 9 | 5 | 8 | 6 | | http://www.plasmaetch.com | 17 | 23 | 29 | 26 | 20 | 10 | 7 | 18 | 11 | 5 | 6 | 6 | | http://www.ironwoodelectronics.com/mdm_card.htm | 15 | 23 | 30 | 27 | 7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | http://www.gmplabeling.com | 12 | 22 | 28 | 32 | 22 | 10 | 4 | 15 | 9 | 5 | 16 | 21 | +-------------------------------------------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ 15 rows in set (2.91 sec)
  5. that produces the following results: +--------------+------------+-----------+ | total_clicks | month_name | month_num | +--------------+------------+-----------+ | 865 | January | 01 | | 886 | February | 02 | | 1559 | March | 03 | | 1783 | April | 04 | | 2228 | May | 05 | | 2519 | June | 06 | | 1757 | July | 07 | | 1329 | August | 08 | | 950 | September | 09 | | 837 | October | 10 | | 1309 | November | 11 | | 1283 | December | 12 | +--------------+------------+-----------+ 12 rows in set (14.66 sec) I'm looking to have the results grouped by the 'destination_url' and then show each month as a column with the total. Here is an example below: +---------------------+--------+---------+------+------------+------------+ | destination_url | July | June | May | April | March | +---------------------+--------+---------+------+------------+------------+ | www.yahoo.com | 15 | 15 | 12 | 9 | 12 | | www.phpfreaks.com | 23 | 33 | 10 | 7 | 10 | +---------------------+--------+---------+------+------------+------------+
  6. you are right, sorry. here is the structure for the 'click' table +-----------------+--------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------------------+----------------+ | click_id | int(11) | | PRI | NULL | auto_increment| | datetime | datetime | | MUL | 0000-00-00 00:00:00 | | | destination_url | varchar(255) | | MUL | | | +-----------------+--------------+------+-----+---------------------+----------------+
  7. I need to generate a query that shows the total of 'click' activity for the previous year up-to date group by the 'desination_url'. Here is an example. +---------------------+--------+---------+------+------------+------------+ | destination_url | July | June | May | April | March | +---------------------+--------+---------+------+------------+------------+ | www.yahoo.com | 15 | 15 | 12 | 9 | 12 | | www.phpfreaks.com | 23 | 33 | 10 | 7 | 10 | +---------------------+--------+---------+------+------------+------------+ Kind of like a cross tab query of some sort. Please help. I'm stuck
  8. I need to generate a query that shows the total of 'click' activity for the previous year up-to date group by the 'desination_url'. Here is an example. +---------------------+--------+---------+------+------------+------------+ | destination_url | July | June | May | April | March | +---------------------+--------+---------+------+------------+------------+ | www.yahoo.com | 15 | 15 | 12 | 9 | 12 | | www.phpfreaks.com | 23 | 33 | 10 | 7 | 10 | +---------------------+--------+---------+------+------------+------------+ Kind of like a cross tab query of some sort. Please help. I'm stuck
  9. Beautiful, thanks for the help everyone.
  10. That works great, except i need it to go back 1 year. the output is going forward 1 year ///Output June 2007 July 2007 August 2007 September 2007 October 2007 November 2007 December 2007 January 2008 February 2008 March 2008 April 2008 May 2008
  11. I have this code that count back in months for 1 year. For some reason it outputs MARCH twice. Any idea? $month = array ('now', 'now -1 months', 'now -2 months', 'now -3 months', 'now -4 months', 'now -5 months', 'now -6 months', 'now -7 months', 'now -8 months', 'now -9 months', 'now -10 months', 'now -11 months'); foreach ($month as $a) { $date=strtotime($a); $date=date("F Y", $date); echo $date.'<br>'; } /////Output June 2007 May 2007 April 2007 March 2007 March 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006
×
×
  • 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.