Jump to content
php.lv forumi

mysql delete from


FT3

Recommended Posts

Sveiki , neka nevaru saprast kur kļuda itka visam jabut ok bet neka !

 

<?php
$now = time();
if($_POST['clear']){
echo 'works ?';
mysql_query("DELETE FROM `ct_voted` WHERE `time` < '$now'", $connect)or die(mysql_error());
}
?>
<form method='POST'>
<input name='clear' type='submit' value='iztirit datubazi'>
</form>

 

nekadu kļudu neizmet , tikai to tekstu works ?

Edited by FT3
Link to comment
Share on other sites

Nice1, atkarīgs no tā, kas tiek glabāts kolonā time, jo tas varētu būt laiks līdz kuram balsošana ir aktīva, ja protams tur vispār ir balsošanas sistēma, spriežu pēc tabulas nosaukumu ct-voted. Tomēr informācijas ir pārāk maz, lai saprastu kur ir kļūda.

Edited by Maris-S
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...