Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by hessodreamy

  1. hessodreamy

    ownership of code

    Yeah, that's some pretty good advice there. I discussed it with my MD today, on the assumption that UK terms were similar to US, and he wanted to steer clear of any grey 'joint ownership' area to the point that he forbid any in/out of hours project. He's liable to knee-jerk like that... I did...
  2. hessodreamy

    ownership of code

    ok. That seems fairly common sense. Anybody offer anything different from UK law?
  3. hessodreamy

    ownership of code

    From a general industry point of view, who owns code we write while we are employed by a company? Say if we write code in and out of work time? Is there any agreement on this? There's a couple of neat things I want to work on. Basically it'll be of use to the company, but I want to be free to...
  4. hessodreamy

    Showing first 10 results for each day

    yes, but the problem I was finding was in joining the orders table to itself on the date, making a lot of work becuase it had to extract a date from the timestamp (twice). It seems that the problem isn't solved if I'm using timestamp and still have to convert in order to create the join. Or...
  5. hessodreamy

    Showing first 10 results for each day

    Yes I think I've got my head around it now. I think the main reason it was dying was that i was doing from_unixtime for the timestamp on every row. I added a `date` field on which to join and it worked fine. From what i've read it seems that, in 4.1, there is not a way to set a `date` field...
  6. hessodreamy

    Showing first 10 results for each day

    ahhhhhh.... i think.
  7. hessodreamy

    Showing first 10 results for each day

    I have indexes on orderID, and a unix timestamp field (I don't have a 'date' field). So I used t1.uts>unix_timestamp('2006-02-01') in the where statement. I'm not sure why you'd include the orderTotal in the join condition. Maybe I've explained the problem/definition badly?
  8. hessodreamy

    Showing first 10 results for each day

    That seemed to just kill mysql. Do you think you could explain how it works, so that I can optimise it? I can't really see what's happending.
  9. hessodreamy

    Showing first 10 results for each day

    doesn't work. The group by day just limits the results to 1 entry per day, and shows details of the first order from the day. I can get totals for the day, but what I really want is the top 10 orders.
  10. hessodreamy

    Show week start date

    for example: SELECT from_unixtime(uts,'%u') as week_number, count(*) as orders from ordersTable WHERE from_unixtime(uts,'%Y')=2006 GROUP BY from_unixtime(uts,'%u') Giving +-------------+--------+ | week_number | orders | +-------------+--------+ | 18 | 20 |...
  11. hessodreamy

    Show week start date

    I pull out a lot of reports for weekly figures, but is there any way to get the start date for a particulr week number?
  12. hessodreamy

    Showing first 10 results for each day

    I feel I should be able to work this out, but I'm drawing a blank. How would I retrieve, for example, the top 10 orders for each day for a period, where I order by orderTotal? I can't seem to find any way to limit the results for each day, rather than the results as a whole. Any ideas?
  13. hessodreamy

    Record Lock

    Anyone?
  14. hessodreamy

    Batch file for Backup

    I backup my DB on linux using a bash script. Was a pain in the rear as I wanted to back up each table into a separate file, so i've got 30 different statements running. Maybe there was a better way, but i'm not that clever. here's the script. If you are using windows then you'd need to change...
  15. hessodreamy

    Record Lock

    I can't seem to find an answer in the literature, but is it possible in 4.1 to place a lock on a particular record? Say, to prevent changes to the record while being viewed. There's plenty on table locks but no record locks. Are these not supported?

Part and Inventory Search

Back
Top