| Home » Categories » Multiple Categories | 
| How do I query MySQL Database in PHP ? | 
| Article Number: 86 | Rating: Unrated | Last Updated: Tue, May 1, 2012 at 11:21 PM | 
| Please follow the following guidelines: <html>      <head>              <title>MySQL Test Code</title>      </head>      <body>              <h1>MySQL Test Code Results</h1>              <p>                      <table border="1">                                <tr>                                           <td>pkID</td>                                           <td>username</td>                                           <td>password</td>                                </tr>              <?php              /*              * Configuration Information and Definitions              */              $mysql_host = mysql01.discountasp.net;              $mysql_user = username;              $mysql_pass = password;              $mysql_db  = database;              $query = SELECT * from table1;              mysql_connect($mysql_host, $mysql_user, $mysql_pass) or die("Connection to MySQL-server failed!");              mysql_select_db($mysql_db) or die("Selection of database $mysql_db failed!");              $result = mysql_query($query) or die("Invalid Query, " . mysql_error());              while( list( $pkid, $user, $pass ) = mysql_fetch_row($result) )              {                       printf("<tr><td>%d</td><td>%s</td><td>%s</td></tr>", $pkid, $user, $pass);              }              ?>             </table>       </p> <h1>End MySQL Test Code Results</h1> | 
| 
							Attachments     
									There are no attachments for this article.
							 	  | 
| 
										I cannot find a way to enable ASP.NET 4.5 on my Control Panel
										 Viewed 11113 times  since  Tue, Sep 11, 2012  
										HTTP Error 502.5 - Process Failure error message when publishing an ASP.NET Core Website
										 Viewed 10894 times  since  Mon, Mar 27, 2017  
										Issue with Storing Session
										 Viewed 3871 times  since  Tue, Mar 24, 2015  
										Can you grant SELECT PRIVILEGE to the system table mysql.proc
										 Viewed 6281 times  since  Mon, Jun 18, 2012  
										How do I query MySQL database in ASP.NET?
										 Viewed 12682 times  since  Tue, May 1, 2012  
										How do I send an email from my ASP.NET website by using SMTP Authentication?
										 Viewed 6601 times  since  Tue, May 1, 2012  
										Can i login to my MySQL database via my own mySQL tool?
										 Viewed 3136 times  since  Mon, May 7, 2012  
										How to solve the Let’s Encrypt SSL on ASP.NET Core
										 Viewed 9666 times  since  Mon, Jul 17, 2017  
										What is the connection string for my MySQL database?
										 Viewed 4289 times  since  Mon, May 7, 2012  
										Do you support MySQL WebAdmin Access?
										 Viewed 3321 times  since  Tue, May 1, 2012  | 

 Subscribe to Article
Subscribe to Article Print Article
Print Article Email Article to Friend
Email Article to Friend
							 Export to PDF
Export to PDF Export to MS Word
Export to MS Word Tweet This Article
Tweet This Article Digg It
Digg It Stumble Upon
Stumble Upon Del.icio.us
Del.icio.us