Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2002
    Posts
    1

    Unanswered: Mysql Query & Resultset

    I have just installed mysql 4.0.1 alpha and myodbc 2.50.39-nt

    My question is:
    Why can't I do a Query like this:

    BEGIN;
    SELECT MAX(id) FROM Users;
    COMMIT;

    in a program using myodbc while I can do this query directly to mysql?

    Doesn't support a query or a resulset of that kind?

    Tank you.
    abbruciato

  2. #2
    Join Date
    Jan 2002
    Posts
    11

    Question ...?

    Works fine for me:

    select max(test_id) from test_tbl;

    select max(test_id) as lastTest_id from test_tbl;

    Don't know why you have the BEGIN; & COMMIT; in there... I don't think you need them.

  3. #3
    Join Date
    Feb 2002
    Location
    New Jersey
    Posts
    39
    Check out this link re: transactions in MySQL:

    http://www.mysql.com/doc/C/O/COMMIT.html

Posting Permissions

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