djmartins Posted November 26, 2005 Report Share Posted November 26, 2005 kaa strada taa lieta ka uzskaita cik lietotaji ir lasiijusi kaut kadu textu? Link to comment Share on other sites More sharing options...
Vebers Posted November 26, 2005 Report Share Posted November 26, 2005 Nu katram rakstam pieliec klaat lauku "lasits" un katru reizi kad lietotaajs uzspiezh uz linku "Lasīt vairāk" tad taisi update un pieskaiti klat +1 .. nu k-kaa taa ;) Link to comment Share on other sites More sharing options...
djmartins Posted November 26, 2005 Author Report Share Posted November 26, 2005 Mazliet neiebraucu!Varetu kaut ka vieglaak un konkretak paskaidrot? Link to comment Share on other sites More sharing options...
rpr Posted November 26, 2005 Report Share Posted November 26, 2005 pasaki kaa tu glabaa tos rakstus, tad tev izskaidros konkreetaak Link to comment Share on other sites More sharing options...
Vebers Posted November 26, 2005 Report Share Posted November 26, 2005 (edited) piemeeram tabulas struktuura: raksta_id || autors || nosaukums || teksts || lasits Parasti rakstiem ir ievads un tad links "lasit vairak" lai izlasitu visu rakstu. vai ne tā ? Tad kad lasitajs uzspiezh uz "lasit talak" paradas vinjam raksts kur no Tabulas izvelk araa autoru, tekstu utt.. tad ari pie reizes uztaisi mysql_query("UPDATE tabula SET lasits= '".$lasits + 1."'"); Edited November 26, 2005 by MakaTaNaw Link to comment Share on other sites More sharing options...
djmartins Posted November 26, 2005 Author Report Share Posted November 26, 2005 db->news rows: id|text1|text2|dtime|cat|lasits| Link to comment Share on other sites More sharing options...
Grey_Wolf Posted November 26, 2005 Report Share Posted November 26, 2005 $raksta_id=// konkreetaa raksta ID $query="UPDATE `lasits` SET `lasits` = lasits+1 WHERE `id` = $raksta_id LIMIT 1 "; $result= mysql_query($query); ---- protams laukam lasiits jaabuut Integer /smalinteger utt... Link to comment Share on other sites More sharing options...
Recommended Posts