in reply to Re: Database access on your site, or "Where the hell is mysql?"
in thread Database access on your site, or "Where the hell is mysql?"

You are correct, my error checking is quite inadequete. I intend for it to be fixed "properly" at some point. But for the moment I just want to get the general function working.

My intention with this is for it to be a base/straw man so that I can hire a couple of more experienced programmers to work with me to make it correct. Thus my error checking is lousy.

I do have the database connection information. And I believe the connection is working correctly. It is just the inserts that I think may be failing.

My development box has MySQL installed locally and all the inserts, selects and all work fine with everything local. When I upload to my hosting provider, I am seeing some things that look like they are working, but I don't think it is inserting into the database, or perhaps I am not selecting back from the database correctly. I would like to try to figure out which. If I were on my development system, I would just pull up the mysql client and run some selects from there, but I do not seem to have that client available to me at my hosting provider. Is there an common way to get the equivalent of a mysql client on a remote database?

I know that I have a lot of slop in the code. I am doing it as a demonstration so that I can hire a more experienced programmer to crawl in and fix it. Its easier to explain what I am trying to do by doing it than by waving my hands around. Thanks

Skip
  • Comment on Re^2: Database access on your site, or "Where the hell is mysql?"

Replies are listed 'Best First'.
Re^3: Database access on your site, or "Where the hell is mysql?"
by herveus (Prior) on Oct 03, 2005 at 12:02 UTC
    Howdy!

    Putting in adequate error checking is part and parcel of getting the general function working. If your code can't tell if the database actions worked or not, it's broken. At the least, you can't demonstrate that it isn't broken.

    You could try setting RaiseError to true, which will make it blow up when a DBI error occurs. That will be better than nothing, especially if you couple that with CGI::FatalsToBrowser (or whatever that bit is that makes the CGI error messages go to the browser instead of the local error log where you might never see them.

    yours,
    Michael

      Oh, I don't disagree that error checking is essential. The code will not be ready for real use until it is there. Thanks

      Skip