snach15 Posted November 6, 2010 Report Share Posted November 6, 2010 tātad ar submit pogu es zinu kā to panākt bet kā to vari izradīt ja man ir nevis submit bet gan vnk links? <a href=?news=$row[1]Lasīt ziņu</a> un gribu panākt lai pēc tam kad tiek uz šitā uzkikšķināts tad notiek MSSQL query mssql_query("update ST_News set izlasits_reizes = izlasits_reizes + 1 where news_id='$news_id'"); Quote Link to comment Share on other sites More sharing options...
nikidijs Posted November 6, 2010 Report Share Posted November 6, 2010 To href atstāj kā ir. Un tālāk jau: if (!empty($_GET['news'])){ mysql_query("update ST_News set izlasits_reizes = izlasits_reizes + 1 where news_id='".$_GET['news']."'"); } Quote Link to comment Share on other sites More sharing options...
m8t Posted November 6, 2010 Report Share Posted November 6, 2010 <?php //... echo '<a href="?news='.$row[1].'">'; //... if(is_numeric($_GET['news'])) { msql_query("update ST_News set izlasits_reizes = izlasits_reizes + 1 where news_id='{$_GET['news']}'"); } Quote Link to comment Share on other sites More sharing options...
Kemito Posted November 7, 2010 Report Share Posted November 7, 2010 Kapēc jūs viņam sakat nepareizi? Ir manuprāt kautkāda atšķirība starp MSSQL un MySQL ! Quote Link to comment Share on other sites More sharing options...
daGrevis Posted November 7, 2010 Report Share Posted November 7, 2010 Kemito, tur runa neiet par pašu pieprasījumu, bet gan to, kā lai ar linka palīdzību izsauc pieprasījumu. news.php: <a href="<?= ROOT; ?>/do__read_count.php?id=<?= $database['id']; ?>">Lasīt!</a> do__read_count.php: $id = $_GET['id']; // Validācija. // Pieprasījums. exit( header( "Location: {$root}/news.php" ) ); P.S. "Uz ātru roku"... xD Quote Link to comment Share on other sites More sharing options...
snach15 Posted November 7, 2010 Author Report Share Posted November 7, 2010 paldies visiem .. kautko sameistaroju .. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.