页:
[1]
| tsgx8848 | 2004-11-24 04:04 PM |
|
救命!!!!
$hostName="localhost";
$userName="abcd";
$password="1234";
$dbName="nameofdb";
mysql_connect($hostName,$userName,$password) ;
mysql_select_db($dbName);
$sql_MaxId_A="select max(id) from train_pub where train_name='Authorware培训' ";
$sql_MaxId_F="select max(id) from train_pub where train_name='Flash培训'";
$sql_MaxId_P="select max(id) from train_pub where train_name='Photoshop培训'";
$MaxId_A=mysql_query($sql_MaxId_A) or die("MaxId_A");
$MaxId_F=mysql_query($sql_MaxId_F) or die("MaxId_F");
$MaxId_P=mysql_query($sql_MaxId_P) or die("MaxId_P");
$sql_A="select period,pub_time,introduce from train_pub where id='".$MaxId_A."' ";
$sql_F="select period,pub_time,introduce from train_pub where id='".$MaxId_F."' ";
$sql_P="select period,pub_time,introduce from train_pub where id='".$MaxId_P."' ";
$result_A=mysql_query($sql_A) or die ("result_A");
$result_F=mysql_query($sql_F) or die ("result_F");
$result_P=mysql_query($sql_P) or die ("result_P");
list($period_A,$time_A,$introduce_A)=mysql_fetch_array($result_A);
list($period_F,$time_F,$introduce_F)=mysql_fetch_array($result_F);
list($period_P,$time_P,$introduce_P)=mysql_fetch_array($result_P);
以上代码为小弟所编,但为什么 list()不能析出数据???请各位高手指点!!小弟正急待!!!!!谢了!!! |
Powered by Discuz! Archiver 6.1.0
© 2001-2006 Comsenz Inc.
Processed in 0.005683 second(s), 2 queries |