Results 1 to 2 of 2

Thread: Need some help with SQL (more specifically MySQL)

  1. #1

    Thread Starter
    Fanatic Member Graff's Avatar
    Join Date
    Jan 2002
    Location
    Calgary
    Posts
    668

    Need some help with SQL (more specifically MySQL)

    Question 1
    How would I determine if the Now() is X Date but before 8 am

    ie.

    SELECT EventID FROM Event WHERE Now() = Today AND Now() < 8am;



    --------------------------
    Question 2

    Is it possible to keep my VB project updated on some sort of timer without lagging the program.

    My database has over 2000 contacts and I want to be able to autoupdate the treeview I have that has all the contacts in their vaious subgroups updated semi-regularly without lagging the server and/or program.

    When I first log on, connect to the database and then select all the contact it takes a good 10 seconds.
    If wishes were fishes we'd all cast nets.

  2. #2
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336
    You would use a datetimestamp.. THis posts the Date and Current Time to the DB... Then you just use the Date() and Time() functions of VB to put together a string in VB, then say "SELECT * FROM tblMyTable WHERE DateTime = 'TheTime'"
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width