Search found 9 matches

by JasonMWaldo
Thu Jul 27, 2006 1:21 am
Forum: Databases
Topic: php mysql insert error
Replies: 4
Views: 359

bdlang, you are absolutely right, my error.
by JasonMWaldo
Wed Jul 26, 2006 11:53 pm
Forum: Databases
Topic: php mysql insert error
Replies: 4
Views: 359

Try:

Code: Select all

INSERT INTO testtable VALUES('NULL', 'some value')
by JasonMWaldo
Wed Jul 26, 2006 11:05 pm
Forum: PHP - Code
Topic: Frustration calling class from another class.
Replies: 4
Views: 735

Thanks sweatje. That answered quite a few of the concerns. One of the main ones that I had was using the -> twice in the same statement, it looked clunky and I was wondering if it was indeed the correct way to handle this type of call. I originally used the 'open' and 'close' as part of a regular fu...
by JasonMWaldo
Wed Jul 26, 2006 9:47 pm
Forum: PHP - Code
Topic: Frustration calling class from another class.
Replies: 4
Views: 735

The classes are all very basic at this point, not much done in them, but here is the relevent code, all of the variables coming from the main script are set in an include file. I should also mention that I have only been working with PHP for about 6 months and I had the brilliant idea to try to lear...
by JasonMWaldo
Wed Jul 26, 2006 9:35 pm
Forum: PHP - Code
Topic: Frustration calling class from another class.
Replies: 4
Views: 735

Frustration calling class from another class.

I'm running into a bit of frustration with something that I am trying to do and would appreciate any pointers in the right direction. I'm setting up a class to do some authentication and a second class to handle the database connections. The main script calls a method in the first class with an indi...
by JasonMWaldo
Wed Jul 26, 2006 4:43 am
Forum: Databases
Topic: Should I close the MySQL connection?
Replies: 6
Views: 485

Thanks astions, after reading that and skimming through the comments on the mysql_pconnect() page in the online PHP manual, I think I will avoid them on anything that I am putting on the web. I'll probably play around with them on my own system just to see what the differences in performance look li...
by JasonMWaldo
Wed Jul 26, 2006 4:29 am
Forum: Databases
Topic: Should I close the MySQL connection?
Replies: 6
Views: 485

Good pints on the issue, thanks. I think I will continue to explicitly close the connection for safeties sake. I'm not quite up to the point where I have seen a need for a more persistant connection than that provided by a single page load and the queries handled by that one page. Is there any secur...
by JasonMWaldo
Wed Jul 26, 2006 4:12 am
Forum: Databases
Topic: Should I close the MySQL connection?
Replies: 6
Views: 485

Yep, I read that, but I also noticed in all of the sample scripts that I saw in the MySQL portion of it, they always closed that connection. I think I remember seeing something about a 15 to 30 second timeout on the connection also. I guess the gist of the question is, will the overhead of waiting f...
by JasonMWaldo
Wed Jul 26, 2006 4:03 am
Forum: Databases
Topic: Should I close the MySQL connection?
Replies: 6
Views: 485

Should I close the MySQL connection?

I'm currently learning classes and writing a set of programs that will be accessing a MySQL database. I have been coding PHP for about six months, four of that working with MySQL. I decided to teach myself classes since they sounded pretty neat. I have adapted a couple of functions already into a da...