asking about data base
function main2(){
$sql = mysql_query("select * from clubs,venue where id<>".$_SESSION['userid']);
$cnt开发者_如何学Python = 0;
while($row = mysql_fetch_array($sql)like
<td width="19%"><?php echo $row['club_name'];?></td>
when I use this code, my entry will be double show to me. What wrong with this like club name will be show twice to me.
Probably because you don't JOIN the tables in your SQL query so the engine doesn't know how the data are related.
You're doing a JOIN on the clubs and venue table. Depending on how your rows are saved, it'll give you all the possible matches. If you have a specific result in mind, please explain it and we'll need your database schema (the structure of your DB) as well.
精彩评论