MySQL PHP Error: mysql_query(): Unable to save result set.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jtp51
Forum Newbie
Posts: 6
Joined: Mon Aug 25, 2003 4:55 pm
Location: Omaha, Nebraska

MySQL PHP Error: mysql_query(): Unable to save result set.

Post by jtp51 »

STATS:

PHP Version 4.3.3:

'./configure' '--with-zip' '--with-zlib' '--enable-ftp' '--with-mysql=/usr/local/mysql' '--with-oci8=shared,/opt/app/oracle/product/8.1.7/' '--enable-dbase' '--with-mssql=/usr/local' '--with-apxs=/usr/local/apache/bin/apxs'

MySQL:

Active Persistent Links 0
Active Links 0
Client API version 3.23.49
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/mysql/include/mysql
MYSQL_LIBS -L/usr/local/mysql/lib/mysql -lmysqlclient

ISSUE:

Running the code below results in the following error:
Warning: mysql_query(): Unable to save result set in process_login.php on line 80
Unknown MySQL error
Line 80 is:

Code: Select all

<?php
$LoginRS = mysql_query($query, $connFDAuth) or die(mysql_error());
?>
The $query is:

Code: Select all

<?php
$query = "SELECT uid, name, password  FROM user WHERE active = '1' AND name='$username' AND password='$password'"; 
?>
The $connFDAuth is:

Code: Select all

<?php
$connFDAuth = mysql_connect(trim($hostname), trim($username), trim($password)) or trigger_error(mysql_error(),E_USER_ERROR); 
?>
I have googled this issue several times with no luck, any help or direction is greatly appreciated.

Thank you for reading this post.
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

select db

Post by phpScott »

maybe you just missed posting it but I don't see the

Code: Select all

<?php
mysql_select_db($dbname, $dbconnection);
?>
phpscott
jtp51
Forum Newbie
Posts: 6
Joined: Mon Aug 25, 2003 4:55 pm
Location: Omaha, Nebraska

Post by jtp51 »

Good call, however I do have the block of code.

Code: Select all

<?php
mysql_select_db(trim($database), $connFDAuth);
?>
Thank you for taking a look.
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

echo query

Post by phpScott »

Have you tried to echo'ing out your query before you submit it and run it agianst the db using phpMyAdmin or command line or what ever you want to see if it is a really weird query error.
If it comes down to configuration one of the guru's around here will have to help.
jtp51
Forum Newbie
Posts: 6
Joined: Mon Aug 25, 2003 4:55 pm
Location: Omaha, Nebraska

Post by jtp51 »

Yes, I have echo'ed the query results and then ran the line in MySQL without errors.

Interesting development. This will work on PHP Version 4.3.4!!! The entire tool works just fine on this PHP build, but not on PHP Version 4.3.3.

As you said, this has to be a configuration issue.

Thank you for taking a look.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

tried it without the link id?
Post Reply