Professional Web Applications Themes

insert statement into a mySQL dB from PHP - PHP Development

I have an insert statement into a mySQL db from PHP 99% of the time the statement executes properly but occasionally no write to the db occurs, even though the script executes. All the PHP & SQL is logically & syntactically correct. I'm thinking its a db issue, maybe locking? <=guess Anyone got any ideas? Cheers, Keith...

  1. #1

    Default insert statement into a mySQL dB from PHP

    I have an insert statement into a mySQL db from PHP

    99% of the time the statement executes properly but
    occasionally no write to the db occurs, even though the
    script executes. All the PHP & SQL is logically & syntactically
    correct. I'm thinking its a db issue, maybe locking? <=guess

    Anyone got any ideas?

    Cheers,
    Keith





    K Guest

  2. #2

    Default Re: insert statement into a mySQL dB from PHP

    "K" <botshere.plz> writes:
    > I have an insert statement into a mySQL db from PHP
    >
    > 99% of the time the statement executes properly but
    Do you have statistics to support the 99% figure, or do you really
    mean "almost all of the time" but aren't able to quantify that
    assertion?
    > occasionally no write to the db occurs, even though the
    > script executes. All the PHP & SQL is logically & syntactically
    > correct. I'm thinking its a db issue, maybe locking? <=guess
    Without seeing any code we have no way of knowing that the PHP and
    SQL is "logically & syntactically correct." No offense, but we
    can't take that statement for granted without evidence.

    Are you doing error checking on every database operation? How do
    you know that "no write to the db occurs"? Do the mysqld or web
    server error logs show anything unusual? What versions of MySQL
    and PHP are you using, and on what platform? How consistently can
    you duplicate the problem? Are other processes modifying the
    database concurrent with the process doing the inserts? What's the
    table structure? Have you performed database maintenance to make
    sure your tables aren't corrupted?

    We'd need more information to be able to hypothesize about what's
    wrong.

    --
    Michael Fuhr
    [url]http://www.fuhr.org/~mfuhr/[/url]
    Michael Fuhr Guest

  3. #3

    Default Re: insert statement into a mySQL dB from PHP

    Add a echo "Query failed"; statement to be sure it has really NOT
    failed (if you ain't 100% sure)


    [email]mfuhrfuhr.org[/email] (Michael Fuhr) wrote in message news:<3fc02fdd$1_4omega.dimensional.com>...
    > "K" <botshere.plz> writes:
    >
    > > I have an insert statement into a mySQL db from PHP
    > >
    > > 99% of the time the statement executes properly but
    >
    > Do you have statistics to support the 99% figure, or do you really
    > mean "almost all of the time" but aren't able to quantify that
    > assertion?
    >
    > > occasionally no write to the db occurs, even though the
    > > script executes. All the PHP & SQL is logically & syntactically
    > > correct. I'm thinking its a db issue, maybe locking? <=guess
    >
    > Without seeing any code we have no way of knowing that the PHP and
    > SQL is "logically & syntactically correct." No offense, but we
    > can't take that statement for granted without evidence.
    >
    > Are you doing error checking on every database operation? How do
    > you know that "no write to the db occurs"? Do the mysqld or web
    > server error logs show anything unusual? What versions of MySQL
    > and PHP are you using, and on what platform? How consistently can
    > you duplicate the problem? Are other processes modifying the
    > database concurrent with the process doing the inserts? What's the
    > table structure? Have you performed database maintenance to make
    > sure your tables aren't corrupted?
    >
    > We'd need more information to be able to hypothesize about what's
    > wrong.
    pouzzler Guest

Similar Threads

  1. Question Insert from ASP to SQL using recordset data as values in insert statement
    By JasonM in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: June 13th, 05:54 PM
  2. Insert statement for MySQL conflict
    By Ad Bec in forum Coldfusion Database Access
    Replies: 5
    Last Post: April 17th, 12:58 PM
  3. Help with INSERT INTO statement
    By s_jancich in forum Coldfusion - Getting Started
    Replies: 1
    Last Post: July 20th, 04:39 PM
  4. Replies: 3
    Last Post: September 30th, 09:24 PM
  5. Simple PHP & MySQL Insert Statement Does Not Work
    By Mark Davenport in forum PHP Development
    Replies: 2
    Last Post: August 15th, 02:22 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