Jump to content

mongoose00318

Members
  • Content Count

    178
  • Joined

  • Last visited

Community Reputation

0 Neutral

About mongoose00318

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Cool man. Ya that works. I was trying to see how much of it I could do using just SQL and PHPMyAdmin. Thanks!
  2. Here is my query so far: SELECT DISTINCT (SELECT COUNT(id) FROM :TABLE WHERE CAST(submit_time AS DATE) = CURDATE() - INTERVAL 7 DAY AND user_id = 7) AS Monday, (SELECT COUNT(id) FROM :TABLE WHERE CAST(submit_time AS DATE) = CURDATE() - INTERVAL 6 DAY AND user_id = 7) AS Tuesday, (SELECT COUNT(id) FROM :TABLE WHERE CAST(submit_time AS DATE) = CURDATE() - INTERVAL 5 DAY AND user_id = 7) AS Wednesday, (SELECT COUNT(id) FROM :TABLE WHERE CAST(submit_time AS DATE) = CURDATE() - INTERVAL 4 DAY AND user_id = 7) AS Thursday, (SELECT COUNT(id) FROM :TABLE WHERE CAST(submit_time
  3. Is their a way to format lr.submit_time in every record that is returned in the $results array without doing like a for/foreach loop? Like array_walk() or something similar? $query = " SELECT lr.*, l.make, l.model, l.part_number, l.description, pd.job_number, pd.line_item, pd.enterprise, pd.description, pd.qty AS order_qty, log.name AS user_full_name FROM leds_requests lr LEFT JOIN leds l ON l.id = lr.product_id LEFT JOIN production_data pd ON pd.id = lr.order_id LEFT JOIN login
  4. @Barand There was additional code below the exit() that I thought was irrelevant to the post and I was trying to keep it short for everyone. Turns out the problem was in the code below the exit(); lol...it was there for debugging purposes. The comment is old; I originally was going pass all that to the function; but instead I just pass the order_id to it now. The rest of is provided elsewhere from other parts of the application. I should have the function buttoned up sometime today and I'll post it for review. It's a part of a big new feature I'm building into the application. I'm looking forw
  5. @mac_gyver Lol just noticed your sig...I don't know...I may have damaged my eyes Friday.
  6. @mac_gyver Man...okay the problem was elsewhere in my code. The query was working fine...I guess it I was looking at it too long Friday and couldn't see it. Sorry about that; it seems to be working now. But as to your question, I'm pretty sure I'm using the FETCH_ASSOC mode.
  7. I've been having issues with this since Friday and still haven't resolved it. If I call that function with a $order_id set to 7601 and the SQL clause says "LIMIT 1" I get a blank array that comes back. If I change it to LIMIT 2; I get the result I expected...but not two records...just the one? There are no blank records in the DB from what I see and if I run that same query in PHPMyAdmin it returns the results I expect? //build LED request buttons function build_led_request_btn($order_id, $pdo) { //info to gather //$order_id, $job_number, $enterprise, $request_id, $request_status
  8. var template = $('#request_led_dialog .led-item:first').clone(); template.insertAfter('#request_led_dialog .led-item:last'); This seems to have fixed it.
  9. It seems like a selector problem. It doesn't seem to matter if I use .first() or .last() or nothing at all; when I dump it to the console it is selecting all .led-item(s)
  10. Kind of have it working now but it's doubling everything up each time instead of just adding one more element : $('.led-item').first().clone().insertAfter('.led-item');
  11. I'm trying to create a simple form that allows the user to add another item when they click a button. Here is my HTML: <div class="row led-item"> <div class="form-group col-10"> <label for="exampleFormControlSelect1">Product</label> <select class="form-control" id="exampleFormControlSelect1"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> </div> <div class="f
  12. @kicken How would I active a shell script through PHP if I wanted to trigger the backup based on certain events that happen? @benanamen Audit Logging looks really interesting. I'd probably need something that parses the logs and makes it easier to search them, etc...something like Monyog? I'm not too familiar with a lot of these more advanced performance and logging features of MySQL. Any additional advice would be welcome!
  13. @benanamen Okay, I was only asking because somethings there are events that happen in the software where I would want a DB backup triggered before any alteration of the data is allowed. I would want regularly timed backups as well; as you suggested above.
  14. What is the best way to perform automated backups of an entire MySQL database using PDO?
  15. @Barand Hmm...okay thanks for the heads up. I'll keep that in mind next time I have to do something similar.
×
×
  • 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.