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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:36:39+00:00 2026-06-01T02:36:39+00:00

I ran this sql query in my database: update payments set method = ‘paysafecard’

  • 0

I ran this sql query in my database:

update payments set method = 'paysafecard' AND amount = 25 WHERE payment_id IN (1,2,3,4,5,...)

Of course i meant set method = 'paysafecard' , amount = 25

However I did it in phpmyadmin and it showed me that rows were affected. After running it again it showed 0 rows affected.

I don’t know what may have changed in the database, what could this have done?

My table looks like this:

CREATE TABLE IF NOT EXISTS `payments` (
  `payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `method_unique_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `method` enum('moneybookers','paypal','admin','wallet','voucher','sofortueberweisung','bitcoin','paysafecard','paymentwall') COLLATE utf8_unicode_ci NOT NULL,
  `method_tid` int(11) DEFAULT NULL,
  `uid` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `plan` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `expires_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `amount` decimal(8,2) NOT NULL,
  `currency` enum('EUR','USD','BTC') COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`payment_id`),
  UNIQUE KEY `method` (`method`,`method_tid`),
  UNIQUE KEY `method_unique_id` (`method_unique_id`,`method`),
  KEY `expires_at` (`expires_at`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=8030 ;

I am running
— Server version: 5.1.41
— PHP Version: 5.3.2-1ubuntu4.11

  • 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-01T02:36:40+00:00Added an answer on June 1, 2026 at 2:36 am

    This would result in the method field being set to ‘0’ for all of your records fitting the where clause.

    It is interpreted as the following:

    set method = ('paysafecard' AND amount = 25)

    This is a logical AND, and results in a boolean value for these records(which will be parsed to the corresponding field of your column).

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

Sidebar

Related Questions

I ran this query on my SQL Server database: begin transaction; insert into [db].[a].[Table1]
In our production database, we ran the following pseudo-code SQL batch query running every
I have a SQL Server 2008 database and I have a problem with this
I ran this persons code. It worked as a main but when i put
How can you get 1 as an output from #2? #1 I ran this
Ran across this line of code: FormsAuth = formsAuth ?? new FormsAuthenticationWrapper(); What do
I ran across this situation this afternoon, so I thought I'd ask what you
I ran across this and was wondering if someone could explain why this works
I ran into this today when unit testing a generic dictionary. System.Collections.Generic.Dictionary<int, string> actual,
I ran across this case of UnboundLocalError recently, which seems strange: import pprint def

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.