H5 Taurus background check can not modify the record

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/fiaofiao_monk/article/details/91411491

The background check and can not record because the code does not correspond to the database. Mainly because there jz_user_room database table.

We open the table found below several fields.

id, uid, room, overtime, jifen, type, corresponding increment primary key id, user Id, the room end time, score, game type.

If the search with the overall situation, you can turn on auto / php54n folder global search jz_user_room use Notepad ++.

In auto / php54n following folder, game1, game2, game10, game14 corresponding six cattle, cows 9, 9, 12 and 8 times bovine cattle.

In the folder, initroom.php and overroom.php there jz_user_room.

For example, the inside overroom.php pick out the following code:

if ($Room[$id]['xx']['js'] > 0) {

foreach ($Room[$id]['user'] as $connection3) {

$jflist[$connection3->user['id']] = $connection3->user['dqjf'];

$add = array();

$add['uid'] = $connection3->user['id'];

$add['room'] = $id;

$add['overtime'] = time();

$add['jifen'] = $connection3->user['dqjf'];

$add['type'] = $Room[$id]['lx'];

$add["settlementType"] = 1;

$add["mode"] = $rules["mode"];

$db->insert('jz_user_room', $add);

}

The above code, the start is to insert data into jz_user_room table inside, easy to see, for a total to go uid, room, overtime, jifen, type, settlementType, mode seven fields inserted inside, why not the id field of it? Because id is the primary key, that is to say do not ignore it automatically inserted after each add 1.

This is seven more than the actual database table jz_user_room more settlementType and mode of these two fields, so it must be executed sql statement failed, resulting in the insertion unsuccessful.

It will result in no record of unsuccessful insertion into the record. So these two options, either in jz_user_room inside these two fields to add, or to delete the above code is to increase operating inside these two fields.

It is recommended to delete, after all, in addition to beef, Golden ah, Excellencies, ah, ah Pai Gow, Mahjong ah, ah these gourds fish also have to jz_user_room insert data inside the table.

After deleting everything back to normal.

Guess you like

Origin blog.csdn.net/fiaofiao_monk/article/details/91411491