Professional Web Applications Themes

how get the back value? - MySQL

hello everyone i want to get the back value when the data is save or modify successfully in the database.how can i do this ? BRs...

Sponsored Links
  1. #1

    Default how get the back value?

    hello everyone
    i want to get the back value when the data is save or modify successfully in
    the database.how can i do this ?
    BRs


    Sponsored Links
    Teng Tao Guest

  2. #2

    Default Re: how get the back value?

    Teng Tao wrote:
    > hello everyone
    > i want to get the back value when the data is save or modify successfully in
    > the database.how can i do this ?
    > BRs
    >
    >
    I'm not clear on what you're looking for. Are you trying to get the row
    you just inserted or updated back? If so, you have to use a SELECT
    statement.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    [email]jstucklexattglobal.net[/email]
    ==================
    Jerry Stuckle Guest

  3. #3

    Default Re: how get the back value?


    "Jerry Stuckle" <jstucklexattglobal.net> wrote in message
    news:v9WdnfuOPsrOFXDZnZ2dnUVZ_qidnZ2dcomcast.com. ..
    > Teng Tao wrote:
    > > hello everyone
    > > i want to get the back value when the data is save or modify
    successfully in
    > > the database.how can i do this ?
    > > BRs
    > >
    > >
    >
    > I'm not clear on what you're looking for. Are you trying to get the row
    > you just inserted or updated back? If so, you have to use a SELECT
    > statement.
    >
    Oh sorry, I meant, if insert or update something, how can I be sure that the
    statement was succesful?
    Does a statement like update or so give a value back, like 1 for success or
    0 for no row has been update or inserted?

    best regards,


    Teng



    Teng Tao Guest

  4. #4

    Default Re: how get the back value?

    Teng Tao wrote:
    > "Jerry Stuckle" <jstucklexattglobal.net> wrote in message
    > news:v9WdnfuOPsrOFXDZnZ2dnUVZ_qidnZ2dcomcast.com. ..
    >
    >>Teng Tao wrote:
    >>
    >>>hello everyone
    >>>i want to get the back value when the data is save or modify
    >
    > successfully in
    >
    >>>the database.how can i do this ?
    >>>BRs
    >>>
    >>>
    >>
    >>I'm not clear on what you're looking for. Are you trying to get the row
    >>you just inserted or updated back? If so, you have to use a SELECT
    >>statement.
    >>
    >
    >
    > Oh sorry, I meant, if insert or update something, how can I be sure that the
    > statement was succesful?
    > Does a statement like update or so give a value back, like 1 for success or
    > 0 for no row has been update or inserted?
    >
    > best regards,
    >
    >
    > Teng
    >
    >
    >
    Depends on what language you're using. For instance, from the command
    line prompt tells you how many rows are affected. PHP returns false
    from the mysql_query() if the query fails. Etc.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    [email]jstucklexattglobal.net[/email]
    ==================
    Jerry Stuckle Guest

  5. #5

    Default Re: how get the back value?

    Jerry Stuckle wrote:
    > Depends on what language you're using. For instance, from the command
    > line prompt tells you how many rows are affected. PHP returns false
    > from the mysql_query() if the query fails. Etc.
    Success/failure of the statement is separate from whether it updated any
    rows. A "successful" UPDATE statement can match 0 rows, by virtue of
    the conditions in the WHERE clause of the statement. A successful
    UPDATE can also affect 0 rows, even if the conditions of the UPDATE
    match some nonzero of rows. Only rows on which a value actually changed
    are counted. I.e. "UPDATE tablename SET columnname=columnname" matches
    all rows of the table, but always returns 0 for the number of affected rows.

    The PHP mysql interface has a function "mysql_rows_affected()" which
    tells the application how many rows were affected by the most recent
    statement.
    See [url]http://www.php.net/manual/en/function.mysql-affected-rows.php[/url]

    Even if another programming interface does not have a specific API call
    for this information, MySQL 5.0 introduces another way to get the same
    information:

    SELECT ROW_COUNT();

    Returns the number of rows updated, inserted, or deleted by the
    preceding statement.

    Regards,
    Bill K.
    Bill Karwin Guest

Similar Threads

  1. Replies: 2
    Last Post: March 21st, 05:18 PM
  2. "Back end not found. Or back end is busy"
    By Yves Glodt in forum Informix
    Replies: 0
    Last Post: September 5th, 11:43 AM
  3. Hey B&H... Please go back to Fed-Ex!
    By Mark M in forum Photography
    Replies: 64
    Last Post: July 19th, 11:03 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139