Jump to content
php.lv forumi

Kur kļūda?


m0zus

Recommended Posts

Kāds lūdzu var pateikt kur ir kļūda?

Man viņš neko neizmet :(

<?php
$connect=mysql_connect ("localhost", "root", "")  or die(mysql_error());  
$db=mysql_select_db ("dbtest",$connect);
$result = mysql_query("SELECT * FROM test")
while($row = mysql_fetch_array( $result )) {
if $row['testrow] == 'z' { $kautkas = "kautkas"; }
echo $kautkas; 
} 
?>

Edited by m0zus
Link to comment
Share on other sites

Šādi vajadz�#8220;tu visam iet:

<?php
$connect=mysql_connect ("localhost", "root", "")  or die(mysql_error());  
$db=mysql_select_db ("dbtest",$connect);
$result = mysql_query("SELECT * FROM test")
  while($row = mysql_fetch_array($result)) {
  if($row['testrow] == 'z') { 
	 echo "kautkas"; 
  }
  } 
?>

Bet ja godīgi, tad tavs kods ir pilnīgi nepareizs :D

Edited by ok1
Link to comment
Share on other sites

×
×
  • Create New...