我想在数据库中的字段中插入一些东西,但它只适用于整数。我将字段切换到varchar
但text
仍然无法正常工作。任何帮助将不胜感激。
我希望变量$r1="value"
进入DB
case 'X':
$r1 = "X";
mysql_query("UPDATE test SET draw = draw + 1 WHERE id = '$test_id'");
mysql_query("INSERT INTO match_select (user_id, match_id, liga, home, away, result) SELECT '$username' AS user_id, '$test_id' AS match_id, '$liga' AS liga, home, away, $r1 AS result FROM test WHERE id='$test_id'");
break;