السلام عليكم
اخواني انا لدي قاعدة بيانات
كود عرض البياناتكود:CREATE TABLE `test` ( `id` int(4) NOT NULL auto_increment, `name` varchar(65) NOT NULL default '', `lastname` varchar(65) NOT NULL default '', `email` varchar(65) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=7 ; -- -- Dumping data for table `test` -- INSERT INTO `test_mysql` VALUES (1, 'Billly', 'Blueton', 'bb5@phpeasystep.com'); INSERT INTO `test_mysql` VALUES (2, 'Jame', 'Campbell', 'jame@somewhere.com'); INSERT INTO `test_mysql` VALUES (3, 'Mark', 'Jackson', 'mark@phpeasystep.com'); INSERT INTO `test_mysql` VALUES (4, 'Linda', 'Travor', 'lin65@phpeasystep.com'); INSERT INTO `test_mysql` VALUES (5, 'Joey', 'Ford', 'fordloi@somewhere.com'); INSERT INTO `test_mysql` VALUES (6, 'Sidney', 'Gibson', 'gibson@phpeasystep.com');
اريد ان يكون في نهاية كود عرض البيانات يظهر لي عدد البياناتكود:<html dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1256"> <title>Add Employee</title> <style type="text/css"/> body { font-family : tahoma; } </style> </head> <body> <?php include("config.php"); $tbl_name="test_mysql"; // Table name $sql="SELECT * FROM $tbl_name"; $result=mysql_query($sql); ?> <div align="center"> <div align="center"> <table border="0" cellpadding="0" cellspacing="0" width="27%" height="20" id="table1"> <tr> <div align="center"> <div align="center"> <table width="393" border="0" cellspacing="1" cellpadding="0"> <tr> <td> <div align="center"> <table width="393" border="0" cellspacing="1" cellpadding="0"> <tr> <td> <div align="center"> <table width="393" border="0" cellspacing="1" cellpadding="0"> <tr> <td> <div align="center"> <table border="1" cellspacing="0" cellpadding="5" style="border-style: solid; border-width: 1px" bgcolor="#FFFFFF" width="468"> <tr> <td align="center" width="227" > <font color="#000000"><strong>Name</strong></font></td> <td align="center" width="78" > <font color="#000000"><strong>lastname</strong></font></td> <td align="center" width="125" > <font color="#000000"><strong>Email</strong></font></td> </tr> <?php while($rows=mysql_fetch_array($result)){ ?> <tr> <td width="227" align="center" bordercolorlight="#FFFFFF" ><b><?php echo $rows['name']; ?></b></td> <td width="78" align="center" bordercolorlight="#FFFFFF" ><b><?php echo $rows['lastname']; ?></b></td> <td width="125" align="center" bordercolorlight="#FFFFFF" ><b><?php echo $rows['email']; ?></b></td> </tr> <?php } ?> </table> </div> </td> </tr> </table> </div> <?php mysql_close(); ?> </body> </html>
مثلا عندي 6 اسما مدخلة في القاعدة وهي
Billly
Jame
Mark
Linda
Joey
Sidney
اريد ان يكون في نهاية الجدول يظهر لي الرقم 6 لان البيانات التي ظهرت 6 صفوف الناتجة عن الاستعلام


رد مع اقتباس
