Jump to content
php.lv forumi

sql vaicājums


ray

Recommended Posts

mana kļūda, bet paldies par atbildēm, doma bija šādam kodam/vaicājumiem:

 

$query  = "SELECT id, lauks_2 FROM tabula WHERE lauks = 1";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)
{
$lauks_2 = $row["lauks_2"]+1;
$query_2 = "UPDATE tabula SET lauks_2 = "$lauks_2" WHERE id = ".$row["id"]."";
mysql_query($query_2);
}

Link to comment
Share on other sites

×
×
  • Create New...