Forum Moderators: coopster
when i try to run this file
<html>
<?php
$open = mysql_connect("localhost");
$data = mysql_db_query("video1, SELECT * FROM video1 WHERE namn LIKE 'sok' ORDER BY namn");
while ($rad = mysql_fetch_array ($data)) {
print "<B>";
print $rad["namn"];
print "nummer";
print $rad["nummer"];
print "</B><BR>";
print "Tid:";
print $rad["tid"];
print "<P>";
}
?>
</html>
is there anybody who knows whats wrong pleas help me
[edited by: jatar_k at 8:52 pm (utc) on Dec. 3, 2002]
[edit reason] no sigs please [/edit]
the like won't match anything as steffan mentioned, if there is no variable part of the match it will work just like equals.
take a look at String Comparison Functions [mysql.com]
you could also try to add an or die [php.net] to your query to get the error from mysql.
like so
$data = mysql_db_query($somequery) or die(mysql_error());