MySQL 3.23.41 vs. 3.23.24-beta w/ selectrow_array
I've created a menu system on a server with 3.23.24-beta and selectrow_array calls work flawlessly. But when I move that same system to a server with 3.23.41, a seemingly updated version, selectrow_array calls work but return with the error: fetch() without execute(). Looking at the DBI module it's using, a call to selectrow_array seems to just translate into a normal prepare/execute/fetchrow_array process. Unfortunately this messes up the error handling code of the menu system since an SQL 'error' is being returned -- regardless of the success of the query. Any help would be greatly appreciated. Thanks, Dave Mittner - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Using SQL in a C Program
Most of my experience with SQL comes from an SQL environment in which the program will run through and end fairly quickly. I'm now up against a constantly running C program which utilizes the database on a regular basis. In this case, is it better practice to only open the connection for the duration of use, or have it open constantly and run a check to reconnect if it dies for some reason? I'm not sure if there's any correct answer to this, but I'd welcome opinions. The speed of the connection is of the utmost importance and if time can be saved by keeping the connection constant, I think I'd prefer that way. Thanks, Dave Mittner - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Using SQL in a C Program
Whoops! Forgive me, I meant to say a CGI environment. This should be a lesson to me to proofread no matter the time restraints. :) - Original Message - From: Dave Mittner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 10:37 AM Subject: Using SQL in a C Program Most of my experience with SQL comes from an SQL environment in which the program will run through and end fairly quickly. I'm now up against a constantly running C program which utilizes the database on a regular basis. In this case, is it better practice to only open the connection for the duration of use, or have it open constantly and run a check to reconnect if it dies for some reason? I'm not sure if there's any correct answer to this, but I'd welcome opinions. The speed of the connection is of the utmost importance and if time can be saved by keeping the connection constant, I think I'd prefer that way. Thanks, Dave Mittner - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Installing MySQL in Home Directory
I'm currently trying to install MySQL in my home directory on a server which I do have root access to. I follow the steps outlined in O'Reilly's 'MySQLmSQL' book and I get through the first several steps before problems occure. To set the stage, I'm using mysql-3.23.47. I'm able to 'configure', 'make', and 'make install' without any issues, but when I go to run 'mysql_install_db', it gives me permission errors trying to access '/var/lib/mysql'. When I ran the 'configure', I added the '--prefix' and '--localstatedir' flags with directories which my login would be able to access, including one which I thought would override '/var/lib/mysql'. Does anyone have any suggestions on what I can try or a different method to my installation? Also, I've never worked with MySQL when it's on a system with other users running their owns. I noticed there's a flag specifying ports. Is that something I'm required to set as well? It makes sense that I'd have to, but I can't find any documents on running MySQL under home directories to confirm it. Thanks, Dave Mittner - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Selecting * from multiple tables
I'm running into a snag... here's an example of the query I'm making from within Perl: SELECT * FROM table1,table2 I know it's not a nice way to do it, but I'm making an SQL webpage frontend which I'd like to support it just in case. I'm using fetchrow-hashref to pull it out and display it. The problem I'm running into is when table1 and table2 have similar column names. One of them would be overwritten in the hash reference to be replaced by the second one it encounters. So my question is this. Is there any way to force MySQL to ouput the table name with the column name instead of just the column name, ie. table1.column2. Thanks in advance, Dave Mittner - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php