door meon » 16 dec 2004, 23:19
<code><color="blue">function</color> getMovieTitle ($id) {
$sql <color="blue">=</color> <color="#808080">"SELECT * FROM movie WHERE id = '$id';"</color><color="blue">;</color>
$record <color="blue">=</color> mysql_query($sql)<color="blue">;</color>
<color="blue">while</color> ($row <color="blue">=</color> mysql_fetch_array($record)) {
<color="blue">return</color> $row[<color="#808080">'title'</color>]<color="blue">;</color>
}
}</code>
//edit: bah, werkt dus niet, nevermind
<code><color="blue">function</color> getMovieTitle ($id) {
$sql <color="blue">=</color> <color="#808080">"SELECT * FROM movie WHERE id = '$id';"</color><color="blue">;</color>
$record <color="blue">=</color> mysql_query($sql)<color="blue">;</color>
<color="blue">while</color> ($row <color="blue">=</color> mysql_fetch_array($record)) {
<color="blue">return</color> $row[<color="#808080">'title'</color>]<color="blue">;</color>
}
}</code>
//edit: bah, werkt dus niet, nevermind :(