Executing SQL within php
-
it might be my newbiness, but i’m having problems trying to execute sql queries within a post:
$query = “SELECT MIN(TrgDuration) FROM C2LogBook WHERE TrgDistance =5000”;
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
echo $row[‘TrgDuration’];
echo $row[‘TrgDate’];
echo $row[‘TrgDistance’];
}mysql_free_result($result);
its not returning anything
not quite sure where the error is 8probably my SQL Query) but any help would be appreciated.
The topic ‘Executing SQL within php’ is closed to new replies.