This link has been bookmarked by 54 people . It was first bookmarked on 24 Jul 2006, by Dan Perry.
-
17 May 14
-
12 Oct 10
-
11 Sep 10
-
01 Aug 10
-
28 Jul 10
-
14 Sep 08
-
20 May 08
-
07 Apr 08
-
18 Oct 07
-
23 Aug 07
-
13 Aug 07
-
19 May 07
-
22 Dec 06
-
08 Nov 06
-
06 Nov 06
-
14 Oct 06
-
23 Sep 06
-
20 Aug 06
-
30 Jul 06
-
05 Jan 06
-
29 Nov 04
-
example mysql access from php <?php // Connecting, selecting database $link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password') or die('Could not connect: ' . mysql_error()); echo 'Connected successfully'; mysql_select_db('my_database') or die('Could not select database'); // Performing SQL query $query = 'SELECT * FROM my_table'; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); // Printing results in HTML echo " "; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "\t "; foreach ($line as $col_value) { echo "\t\t$col_value "; } echo "\t "; } echo " "; // Free resultset mysql_free_result($result); // Closing connection mysql_close($link); ?>
-
example mysql access from php <?php // Connecting, selecting database $link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password') or die('Could not connect: ' . mysql_error()); echo 'Connected successfully'; mysql_select_db('my_database') or die('Could not select database'); // Performing SQL query $query = 'SELECT * FROM my_table'; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); // Printing results in HTML echo " "; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "\t "; foreach ($line as $col_value) { echo "\t\t$col_value "; } echo "\t "; } echo " "; // Free resultset mysql_free_result($result); // Closing connection mysql_close($link); ?>
-
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.