Created
August 29, 2009 19:54
-
-
Save web-zen/177653 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $SQL="SELECT UserID, CONCAT(LastName, ',', Firstname) AS FullName FROM Users ORDER BY LastName, FirstName"; | |
| // prepare statement | |
| if ($stmt = $oTechdocs->prepare($SQL)) { | |
| $stmt->execute() or die ("Could not execute statement"); // execute prepared statement | |
| $stmt->bind_result($UserID, $FullName); | |
| while ($r = $stmt->fetch()) { | |
| echo '<option value="',$UserID,'">',$FullName,'</option>'; | |
| } | |
| $stmt->close(); // close statement | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment