1 #########################################
2 SIMPLE SCRIPT FOR SELECT QUERY
3 #########################################
4
5 < ? php
6 mysql_connect('localhost');
6 mysql_select_db('foo');
6 $result = mysql_query("select * from users");
6 if(!$result) echo mysql_error();
6 else {
6 while($row = mysql_fetch_row($result)) {
6 echo "$row[0] - $row[1] - $row[2] - $row[3] - $row[4]
\n";
6 }
6 }
6 ? >
Output:
mesakh - u8EOdeOls9ERlew - Web Solusi - web.solusi@gmail.com - 7823198438933424
abetnego - 7dTRdsf4Dler4524 - Web Media - e_webmedia@yahoo.com - 7823198438933424
No comments:
Post a Comment