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 8234499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:30:02+00:00 2026-06-07T18:30:02+00:00

This is my first question on StackOverflow, can you please explain to me what

  • 0

This is my first question on StackOverflow, can you please explain to me what I am doing wrong from: I have this code (below) but for some reason, that I have tried to look into and debug, I cannot see why PDO is not completing the request below, it works fine the same way for inserting and echoing, can someone please tell me what’s going on? I am pulling my hair out of my head in frustration.

    $q = "UPDATE content SET urlid=:url, title=:title, description=:desc, keywords=:key     WHERE urlid=:urlid";
    $query = $pdo->prepare($q);
    $query->execute(array(
        ':url'     => $urlid,
        ':title'   => $title,
        ':desc'    => $desc,
        ':key'     => $key,
        ':contloc' => $contloc,
        ':userid'  => $uid,
        ':urlid'   => $urlid
        //':content' => $content
    ));

I receive the following warning in my Apache error log:

[Thu Jul 12 21:07:13 2012] [error] [client 99.230.122.54] PHP Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in /Library/Server/Web/Data/Sites/Default/addto2.php on line 31, referer: http://localhost/sample/4fff30aea1f20

  • 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-07T18:30:04+00:00Added an answer on June 7, 2026 at 6:30 pm
    $q = "UPDATE content SET urlid=:url, title=:title, description=:desc, keywords=:key WHERE urlid=:urlid";
    $query = $pdo->prepare($q);
    $query->execute(array(
        ':url'     => $urlid,
        ':title'   => $title,
        ':desc'    => $desc,
        ':key'     => $key,
        ':urlid'   => $urlid
    ));
    

    PDO complains because you are passing more arguments than you are using in your query. Or perhaps you meant to include more arguments in your query and you forgot?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first post on StackOverflow, so please be gentle... I have some
This is my first question on stackoverflow. I just wonder why my getJSON code
This is my first post on stackoverflow, so please excuse me if my question
I know this question sounds weird, but please, let me explain myself. I'm using
This is my first question ever on StackOverflow, hurray! I can honestly say I
this is my first question, but I've readed StackOverflow for years. Well the thing
This is my first question on stackoverflow, so please bear with me if I
Greetings everyone. This is my first question here at stackoverflow so please bear with
This is my first question on stackoverflow so I'll try to keep it concise
this is my first time asking a question on stackoverflow. I'm working on a

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.