Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8180283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:10:50+00:00 2026-06-07T00:10:50+00:00

The following is my attempt at a prepare statement. It is causing the page

  • 0

The following is my attempt at a prepare statement. It is causing the page to die at the moment so obviously something is wrong.

function telephoneinsert($elector,$inputs,$outputs){
            global $dbh;
            $sql = "UPDATE electors SET $inputs WHERE ID=?";
            $q = $dbh->prepare($sql);
            $q->execute(array($outputs,$elector));
            //UPDATE STATS
        }

That is the function called on page like this

telephoneinsert($Ielector,$inputs,$outputs);

Where $inputs = a posted array that if echoed looks like this name = ?, type =?. It is deliberately rtrim’d to get rid of the last comma.

Same principle with $outputs if echoed looks like benjamin,socialist

ERROR REPORTING SHOWING NOTHING

$this->pdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );
        print_r($dbh->errorInfo());
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:10:52+00:00Added an answer on June 7, 2026 at 12:10 am

    $outputs contains a comma-delimited string, but execute() expects parameters to be passed as elements of an array. Therefore you must split the string apart:

    $q->execute(explode(',', "$outputs,$elector"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following function to attempt to serialize an object to XML..
I'm using the following code: $query = $dbh->prepare(INSERT into crm_order_errors .SET (order_id, number_of_attempts, last_attempt)
I am using the following code to attempt to redirect a dynamic URL to
When I attempt to run the following test in IntelliJ IDEA I get the
I'm using the following code in an attempt to show a dialog with a
In the following code, I attempt to create an SVG circle on the screen
consider the following code, which represents an attempt to implement partial matching. the intended
Consider my first attempt, a simple type in F# like the following: type Test()
I'm using the following code attached to a button, to attempt to open a
I'm trying to login with the following controller action, but my login attempt keeps

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.