Jump to content

Warning: Wrong parameter count for mysql_result() in /home/httpd/vhosts/com/


oskare100

Recommended Posts

Hello,
When I rund this part of the script:
[code=php:0]$sql13 = "select account_username from paypal_sales where txn_id = '$txn_id'";
$result13 = mysql_query($sql13) or die( mysql_error() );
$del_account_username = mysql_result($result13);
echo "Username: $del_account_username";[/code]

I get the error:
Warning: Wrong parameter count for mysql_result() in /home/httpd/vhosts/com/

What does that mean? There is a value for account_username in the table paypal_sales where the txn_id in the database is the same as the $txn_id variable in the script.

Best Regards
Oskar R
Link to comment
Share on other sites

mysql_result() takes a minimum of 2 parameters: the result ID and the row number. You also typically need to pass the column name of the value you're after, too:
[code]
<?php
$del_account_username = mysql_result($result13, 0, 'username');
?>
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.