我试图event id
从下面的示例中获取模板末尾的标头 URLtest.html
。有人可以告诉我我做错了什么吗?
这是我的代码:
<?php
header("Location: templatetest.html?.$row['event_id'].");
mysql_connect("xxxx", "xxxx", "xxxx") or die(mysql_error());
mysql_select_db("xxxx") or die(mysql_error());
$result = mysql_query("SELECT a.* FROM events a INNER JOIN (SELECT id_user, MAX(event_id) as maxID FROM events GROUP BY id_user) b ON a.id_user = b.id_user AND a.event_id = b.maxID WHERE a.id_user = '$test'")
or die(mysql_error());
// store the record of the "example" table into $row
while($row = mysql_fetch_array($result)){
};
?>
谢谢你。