[PHP-DB] multi_query "Commands out of sync" after Insert

2008-01-11 Thread J. Hill
I wouldn't think there would be a result set from a mysqli multi_query when the query is a group of insert statements (there is no auto_increment column), but I get a "commands out of sync" error on my next query. Originally, I had: foreach ( . . . . $sql. = "insert in

Re: [PHP-DB] Insecure Hashes (was Re: Beginners Problem)

2008-01-22 Thread J. Hill
words, but if you really need security, it seems like one of the better options. I've been testing it myself, and the only issue I see is, of course: keeping the key secret. I've been looking at a few methods, but I'm always interested in others ideas on that issue. Regards,

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread J. Hill
I may be a little confused: the desire is to return all the rows from TableA that match the record_id of a row in TableB that has the MAX timestamp? If so, why not something like: SELECT * FROM TableA a, TableB b WHERE a.record_id=b.record_id && timestamp=(SELECT MAX(timestamp) FROM TableB) O

Re: [PHP-DB] Table optimization ideas needed

2008-03-24 Thread J. Hill
From a quick perusal of the article Chris mentions, I'd generally agree with that view about table optimization -- I'm not an expert on Postgres, but the recommendations generally seem to apply to MySQL as well. My basic view is that, if you are routinely doing a select on millions of rows, y

Re: Fwd: [PHP-DB] MySQLi connections

2008-11-25 Thread J. Hill
Reading the thread on mysqli connection issues, I am curious if anyone knows of a downside to creating a connection from a configuration page and using it as a global in all functions? I am used to creating a class and a database handle for functions to use, but I inherited an intranet that ju

Re: Fwd: [PHP-DB] MySQLi connections

2008-11-25 Thread J. Hill
come a PHP expert, a C++ expert, a Java expert, and time to save the world. Thanks again, Jeff Chris wrote: J. Hill wrote: Reading the thread on mysqli connection issues, I am curious if anyone knows of a downside to creating a connection from a configuration page and using it as a glo