Hi,
I wish to extract a user id (req_user)who has made the last post on the viewed auction ($auction_id) from a table containing many different auction_id's and which also contains many of the required auction_ids.
I require the last posted record associated with the auction being viewed ($auction_id), but ignore the seller's previous post, if his was the last posted.
//----Get previous questioniare users ID
$query = "select req_user from AUCTION_request WHERE req_auction=$auction_id AND req_user<>$seller_id ORDER BY id DESC, limit 1";
$result = mysql_query($query);
if(!$result) {
MySQLError($query);
exit;
}
With the above script I get an error "check your syntax around limit 1"..
1> Is the query correct in logic..
2> Not sure how to cure the error as I only require 1 record.
many thanks in anticipation
John
Flash
I wish to extract a user id (req_user)who has made the last post on the viewed auction ($auction_id) from a table containing many different auction_id's and which also contains many of the required auction_ids.
I require the last posted record associated with the auction being viewed ($auction_id), but ignore the seller's previous post, if his was the last posted.
//----Get previous questioniare users ID
$query = "select req_user from AUCTION_request WHERE req_auction=$auction_id AND req_user<>$seller_id ORDER BY id DESC, limit 1";
$result = mysql_query($query);
if(!$result) {
MySQLError($query);
exit;
}
With the above script I get an error "check your syntax around limit 1"..
1> Is the query correct in logic..
2> Not sure how to cure the error as I only require 1 record.
many thanks in anticipation
John
Flash