$ Id] for UNION and WHERE; $ id & quot; whereWebMailUserN & quot; from another page hyperlink ;. $ id; -- traverses the data in all tables in the array and displays the field content $ tablearray (& quot; content_201202 & quot;, & quot; content_201203 & q about UNION and WHERE
$ Id = $ _ GET ['id']; // The value sent from another page hyperlink
$ Id = "where WebMailUserN =". $ id;
// -- Traverse all the table data in the array and display the field content
$ Table = array ("content_201202", "content_201203", "content_201204 ");
$ Select = array ();
Foreach ($ table as $ v ){
$ Select [] = "(select * from $ v $ id )";
}
Echo $ sqll = join ('join', $ select );
$ Sqll = mysql_query ($ sqll );
$ Num = mysql_num_rows ($ sqll); // The total number of records.
$ Sqln = join ('join', $ select). "limit $ page $ pagesize ";
$ Sqln = mysql_query ($ sqln );
While ($ row = mysql_fetch_array ($ sqln )){.......}
(Select * from content_201208 where WebMailUserN = $ id) UNION (select * from content_201209 where WebMailUserN = $ id) UNION (select * from content_201210 where WebMailUserN = $ id)
Warning: mysql_num_rows (): supplied argument is not a valid MySQL result resource in F: \ www_local \ G04 \ list_content.php on line 49
Warning: mysql_fetch_array (): supplied argument is not a valid MySQL result resource in F: \ www_local \ G04 \ list_content.php on line 53
The above code does not know the error and does not display data.
------ Solution --------------------
You need to upload the id to the next page in the url.