You are here: Re: Approving Items « PHP Programming Language « IT news, forums, messages
Re: Approving Items

Posted by Pedro Graca on 10/22/06 20:17

James54321 wrote:
> btw i forgot to say that your code is great (afaik) but i dont quite
> know what the bit after each case does ie the bit in between case1:
> THIS BIT and break;
> :S

If I remember correctly from my last post you mean the function calls
with the id.

switch ($value) {
case 0: break;
case 1: submission_delete_or_whatever_it_was($key); break;
}

Well, that `submission_delete_or_whatever_it_was` is a function that
deletes (or something else) the submission of the id $key.

You are expected to code it :)
It will be something like

function submission_delete_or_whatever_it_was($id) {
$validated_id = (int)$id;
if ($validated_id < 1) return false;

$sql = "delete from TABLE where ID=$validated_id";

if (mysql_query($sql)) return mysql_affected_rows()
else return false;
}

--
I (almost) never check the dodgeit address.
If you *really* need to mail me, use the address in the Reply-To
header with a message in *plain* *text* *without* *attachments*.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация