Jump to content

Search the Community

Showing results for tags 'call_user_func_array'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. Hi, i'm getting the following error when executing the following code. The count should be right That line may now be 39 ( call_user_func_array() )I've tried hard coding the types too (so no extra comma)! And without array_values(), plus other things... and when I print each set of params out they are right if(isset($_POST['order'])){ print "Order<br />"; $param=array(); $params=""; $params2=""; foreach($_POST as $k=>$v){ $pos = strpos($k, 'sku'); if($pos!==false&&$pos==0){ $param[]=$k; $params.="s"; $params2.="?,"; } } if(count($param)>0){ print "Selecting<br />"; if($stmt = $db->prepare("SELECT sku, title, info, quant, cost FROM ".$db_table_prefix."product WHERE sku IN (".$params2.")")) { call_user_func_array('mysqli_stmt_bind_param', array($stmt, $params, array_values(&$param))); $stmt->execute(); Many thanks!
  2. Here is my mysqli query: SELECT `artwork`,`artist`,`title`,`label`,`year`,`price`,`id` FROM `products` WHERE (`qty` <> 0) AND (`agedOff` <> 1); I know this query works. I typed it into the mysqladmin window and it returned the desired results. Here is the variable setup & database query: $artwork = ''; $artist = ''; $title = ''; $label = ''; $year = 0; $price = 0.00; $id = ''; $vars = array(&$artwork, &$artist, &$title, &$label, &$year, &$price, &$id); //I placed the ampersands before the array values, because bind_results requires that you pass as reference if (!$stmt = $mysqli->prepare($query)) { echo "Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error; } if (!$stmt->execute()) { echo "Execute failed: (" . $stmt->errno . ") " . $stmt->error; } if (!call_user_func_array(array($stmt, 'bind_result'), $vars)) { echo "Binding results failed: (" . $stmt->errno . "( " . $stmt->error; } if($stmt->fetch) { //this part does not execute } The error message I receive is: "Notice: Undefined property: mysqli_stmt::$fetch in /hermes/waloraweb073/b2264/moo.katc/cobra/lib/distro.php on line 75 Fetching results failed: (0)" Can someone point me in the right direction please?
×
×
  • 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.