[Solved] MySQL INSERT working properly as documented [closed]


Try this:

mysql_query("
  INSERT INTO
    m_select
    (id, id_m, hello, bye)
   SELECT
     '$U' AS id,
     '$$t_id' AS id_m,
     hello,
     bye
   FROM test1 WHERE id='$test_id'
");

I’m not sure whether the double-dollar sign on $$t_id (rather than $t_id) is intentional or not, but I thought I’d at least make you aware of it.

4

solved MySQL INSERT working properly as documented [closed]