Ec (2); & lt ;? Php tutorial $ bbsconnmysql tutorial _ connect (& quot; localhost & quot;, & quot; root & quot;, & quot;); mysql_select_db (& quot; lsmsql & quot;, $ bbsconn); $ kind & quot; slide & quot; $ SQL & quot; select * fromsa script ec (2); script
$ Bbsconn = mysql tutorial _ connect ("localhost", "root ","");
Mysql_select_db ("lsmsql", $ bbsconn );
$ Kind = "slide ";
$ SQL = "select * from sa_article where kind = '$ kind' order by articleid desc limit 0, 6 ";
$ Result = mysql_query ($ SQL );
$ Pics = $ links = $ texts = "";
While ($ rows = mysql_fetch_array ($ result )){
$ Pics. = "/attached/". $ rows ['source']. "| ";
$ Links. = "show. php? Id = ". $ rows ['articleid']." | ";
$ Texts. = $ rows ['title']. "| ";
}
$ Pics = substr ($ pics, 0,-1 );
$ Links = substr ($ links, 0,-1 );
$ Texts = substr ($ texts, 0,-1 );
?>
Slides