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

  • Home
  • SEARCH
  • 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 684659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:50:28+00:00 2026-05-14T01:50:28+00:00

My query: mysql::getInstance()->update(‘requests’, array(‘response’ => mysql_real_escape_string($_POST[‘status’])), array(‘secret’ => $_POST[‘secret’])); ?> If i wand to

  • 0

My query:

mysql::getInstance()->update('requests', array('response' => mysql_real_escape_string($_POST['status'])), array('secret' => $_POST['secret'])); ?>

If i wand to add string with “&” symbol, all symbols after “&” stripped.

Example:
string: !”№;%:?()_+!@#$%^&()_+

in database i see only: !”№;%:?*()_+!@#$%^

How to fix this?

update function, if anyone need:

function update($table, $updateList, $whereConditions)
{
    $updateQuery = '';
    foreach ($updateList as $key => $newValue) {
        if (!is_numeric($newValue)) {
            $newValue = "'" . $newValue . "'";
        }
        if (strlen($updateQuery) == 0) {
            $updateQuery .= '`' . $key . '` = ' .  $newValue;
        } else {
            $updateQuery .= ', `' . $key . '` = ' .  $newValue;
        }
    }
    return $this->query('UPDATE ' . $table . ' SET ' . $updateQuery . $this->buildWhereClause($whereConditions));
}

UPD:
echo mysql::getInstance()->getLastSQL() says:

UPDATE requests SET `response` = '!\"№;%:?*()_ !@#$%^' WHERE `secret` = '52a4ab5f7f3e8491e60b71db7d775ee2'

so, problem with function update in mysql class?

Slaks, i need to use str_replace(‘&’, ‘%28’, $query); ?

  • 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-05-14T01:50:28+00:00Added an answer on May 14, 2026 at 1:50 am

    You’re probably passing a raw & character in the querystring, which causes everything after the & to be parsed as second parameter by PHP. (Before it gets into your variable)

    You need to escape the & as %26.

    EDIT: You need to escape it before you send it to the server. (When you make the HTTP request)

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

Sidebar

Related Questions

I have two different tables, lead and click. I would like to query MySQL
Mysql query question How to count as 1 if is 1,2 or 5 for
MySQL Query works fine using MySQL workbench but produces an error when I am
Mysql query returns result like this collector amount name 1 0.00 gihan 1 2000.00
In a MySQL query I am using the timediff/time_to_sec functions to calculate the total
My MYSQL query isn't inserting properly via a form I had made. The query:
I need to query MySQL for the current date (from PHP) in YYYY-MM-DD format...
We have a query(mysql) which returns data in the following format of alphabets followed
I need to findout a better and quick way to query MySQL table to
I want to store mysql query in zend registry because i have one action

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.