I like the "conn.execute" in ASP. Because it is pretty short, and I just want to extract one thing. But in PHP I have to use 3-5 rows of code to get the same:
nPost=Conn.Execute("SELECT id AS nPost FROM mytable1 WHERE date='"& sDate &"' ").fields(0)
And here is the PHP equal:
$nPost="SELECT id FROM mytable1 WHERE date='". sDate ."'";
$result=mysqli_query($con, $nPost);
while($rows = mysqli_fetch_array($result))
{
$nPost = $rows['id'];
}
Is there a shorter way to achieve this? Thanks