Hello,
I have looked over many examples of how to populate a dropdown with rows like
$sql="SELECT id, thing FROM table";
$result=sqlsrv_query($conn,$sql) or die("Couldn't execut query");
while ($data=sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC)){
$id=$row["id"];
$thing=$row["thing"];
$options.="<option value=\"$id\">".$thing "</option>";
}
But i need to populate this list with tables and will need to set values for an auto-submit feature.
I know using
$sql = "SELECT NAME FROM <database>..sysobjects WHERE xtype = 'U'";
will give me a list of the tables but im not sure how to use with a while loop.
Any help would be greatly appreciated.