Results 1 to 1 of 1

Thread: Prepared statement bind_param() count

  1. #1
    Join Date
    May 2010
    Location
    Sacramento, CA
    Posts
    91
    Thanks
    23
    Thanked 2 Times in 2 Posts

    Default Prepared statement bind_param() count

    What am i doing wrong?!

    PHP Code:
    $user->getUserRegions($uid); 
    PHP Code:
    function getUserRegions($uid){
            global 
    $mysqli;
            
            
    $stmt=$mysqli->prepare("SELECT user_region.default, company_region.name FROM user_region, company_region WHERE user_region.region=company_region.id AND user_region.user=?");
            
    $stmt->bind_param($uid);
            
    $stmt->execute();
            
    $stmt->bind_result($rdef,$rname);
            while(
    $stmt->fetch()){
                echo 
    $rname.'<br>';
            }
            
    $stmt->close();
        } 
    Code:
    Warning: Wrong parameter count for mysqli_stmt::bind_param()
    This is killing me! any help is appreciated.
    Last edited by crobinson42; 09-19-2012 at 03:00 AM. Reason: resolved

Similar Threads

  1. Resolved Mysqli prepared stmt - using object multiple times?
    By crobinson42 in forum PHP
    Replies: 11
    Last Post: 09-06-2012, 02:43 AM
  2. Change syntax from Update Case Statement to Update Union Statement
    By newphpcoder in forum MySQL and other databases
    Replies: 0
    Last Post: 11-11-2011, 01:23 AM
  3. need help with an if else statement
    By jefflong in forum PHP
    Replies: 1
    Last Post: 02-10-2011, 05:47 PM
  4. Using an If Statement here...
    By tomyknoker in forum Flash
    Replies: 1
    Last Post: 03-27-2007, 01:16 PM
  5. Google update- be prepared
    By MisterD in forum The lounge
    Replies: 3
    Last Post: 09-03-2006, 09:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •