The UPDATE statement with parameters fails to update the database issue

Updated on technology 2024-03-15
18 answers
  1. Anonymous users2024-02-06

    Share common computer tips, computer knowledge, computer skills, computer common problem solutions, etc., what we are sharing today is, 4 steps to solve windows update can not be updated or update error, thank you fans for your continued support.

  2. Anonymous users2024-02-05

    The statement is correct, but there is no record in your admin table that matches the requirements after your where, it is recommended to add a SQL after this statement and send the result. Also, ask, do you execute (sql) after this line??

  3. Anonymous users2024-02-04

    You want to make sure that the conditions that follow where are met.

  4. Anonymous users2024-02-03

    One is that you want to make sure that your database connection is okay, which means that conn is valid.

    The second is to try to change it like this.

  5. Anonymous users2024-02-02

    user is a reserved field to be appended.

  6. Anonymous users2024-02-01

    Did you succeed in the execution? Grammar is fine, you have to start with the table. Try a different table.

  7. Anonymous users2024-01-31

    If the database is an oracle, remember commit

  8. Anonymous users2024-01-30

    Put the final update statement you ran ** into the database and run it directly to see if it works.

  9. Anonymous users2024-01-29

    Is it with mybastis?At least you can send SQL statements for a variety of reasons

  10. Anonymous users2024-01-28

    Because you misunderstood.

    Take a look at it.

  11. Anonymous users2024-01-27

    Yours is PHP, right?

    sql="update `admin` set `name` = '$name', `pwd` = '$pwd' ";

    I don't understand the syntax of php. But your set name='$name',pwd='#pwd'

    You check whether your name and pwd variables have been assigned, and check whether the quotation marks of your SQL statement are used correctly.

    For example, in ASP:

    name=request("name")

    pwd=request("pwd")

    That's right.

  12. Anonymous users2024-01-26

    If your table has two records.

    name pwd

    aa bbcc dd

    You update admin set name='ee' ,pwd='ff'

    Which one is newer?

    If you want to add a new value use insert

    insert admin(name,pwd) values('ee','ff')

    If you update the value of the first one.

    update admin set name='ee' ,pwd='ff' where name='aa'

  13. Anonymous users2024-01-25

    You don't have to ask anyone else this question, brother! If it's used on a web page, it's a matter of permissions! 100%

    Just set the database permission to: everyone in win2000! Because I am using the WinXP Home version of the operating system, I can't give detailed steps.

    Don't forget to give me extra points if you can use it!

  14. Anonymous users2024-01-24

    Hello, your question, I read it and tried it too.

    update t set c1 = c1 where c2 = 001'

    When you do this statement, put this c2 = 001'The c1 field of this record is assigned to c1 itself, so there is no change in the surface display effect. To put it bluntly, it is to operate the database once in vain.

  15. Anonymous users2024-01-23

    If you write it that way, you will report an error that the data type does not match.

    If you want to copy the content in the previous C1 column, you can do so this way:

    update t set c1=(select c1 from t where c2='001') where c2='001'

    Although the logic is a bit far-fetched, the truth is that way.

  16. Anonymous users2024-01-22

    Copy the values of column C1 to column C1.

    Nothing is actually the same.

  17. Anonymous users2024-01-21

    update t set c1='c1' where c2='001'

    Change the data in the C1 field of c2='001' to C1

  18. Anonymous users2024-01-20

    There is no commit, but there are two possibilities

    No commit

    Your where conditions are incorrect, and you can't update the data you want to update.

Related questions
5 answers2024-03-15

Since you don't know the primary key in your t hy cus install table, it's safer to use exists. >>>More

9 answers2024-03-15

Use the byval keyword to indicate that the parameter is passed by value, but your first argument is written by byref, which is passed by address, and the second argument is written at nothing, and it is also passed by address by default.

11 answers2024-03-15

To be clear, only"Value parameters and variable parameters"How can I help you?

14 answers2024-03-15

1. PMMA barrel temperature feeding area 60 80 (70).

District 1 150 200 (190). >>>More

7 answers2024-03-15

Half-False and Half-True]: False: False; Really:

Authentic. Half hypocrisy, half truth. It means that the truth and falsehood are mixed and difficult to distinguish. >>>More