V
V
vvsh2012-08-18 19:45:53
MySQL
vvsh, 2012-08-18 19:45:53

How to solve the problem with mysql (there is no data in the database after adding, with the current connection)?

Hello
, the problem is as follows:
we execute a query in mysql to add a record.
and if immediately after that you execute a query to select this record or delete it, then mysql responds that there is no added record, and only if you reconnect to the database, then the data becomes available from mysql.
is it possible to access the data immediately, thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Next_Alex, 2012-08-18
@Next_Alex

The description looks like a disabled autocommit.
True, in this case, the database should be updated by commit, and not by disconnection.
Perhaps the problem is in the method of accessing mysql.
Where are you accessing the database from and how?
Try, for verification purposes, after the request to add data, perform a commit.

L
lubezniy, 2012-08-18
@lubezniy

PHP accessing through mysql_query() functions and InnoDB tables?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question