User Profile

Collapse

Profile Sidebar

Collapse
luxsphinx
luxsphinx
Last Activity: Mar 6 '11, 06:15 PM
Joined: Jun 25 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Code:
    UPDATE orders_products,products SET orders_products.products_part = products.products_part,
    orders_products.products_old_part = products.products_old_part
    WHERE orders_products.products_id = products.products_id and isnull(orders_products.products_part)
    This seems to have worked perfectly, thank you very much dgreenhouse!
    See more | Go to post

    Leave a comment:


  • MySQL, pull data from a column in a different table only if a second column matches

    Okay, so I've got two tables. One is called "orders_product s" and the other is called "products". They contain different fields but have a couple that match up. When an order is placed, orders_products is filled with a bunch of data about the item in question - including a field called 'products_id' which is unique to the different items. The "products" table has less information about orders (no quantity field or...
    See more | Go to post

  • Thank you very much!

    That did the trick perfectly. I had tried "DATE(HOUR(time ))" and "HOUR(DATE(time ))" but never tried "DATE(time) , HOUR(time)".

    This has been one of those very frustrating problems with a simple solution that was just escaping me. I can now move forward with setting up the other graphs and adding new sensors.

    Once again, thank you....
    See more | Go to post

    Leave a comment:


  • The problem seems to be getting the proper time period.

    Running:
    SELECT AVG( Fahrenheit ), time FROM temparchive WHERE YEARWEEK(time) = YEARWEEK(CURREN T_DATE) GROUP BY HOUR( time ) ORDER BY time ASC

    ...does give me the a set of hourly averages, but it combines all the days into one. So while three days worth of data should give me 72 averages, it instead gives me only 24 averages where all of the 1AM's (or in this...
    See more | Go to post

    Leave a comment:


  • How to pull hourly averages for a week's worth of data (5 minute intervals) in MySQL?

    OS: Ubuntu Linux
    PHP: v5.3.2
    MySQL: v5.1.41

    Hello all,

    I'm new to Bytes, but I'm hoping that someone here will be able to help me as I learn PHP and MySQL. With any luck, I'll understand it enough that I may be able to help others in the future.

    Hopefully I posted this to the right section (it's for a PHP file that makes a call to a MySQL database) - my apologies if I should have went to...
    See more | Go to post
No activity results to display
Show More
Working...