Hi
I'm stuck with this bit of code
What I want to do is show all the user in a form and NOT delete them
Here is the code
###########################################
##code start
<?php
require_once './inc/application.php';
hwDeleteUsers('SELECT u.* FROM '.TBL_USER.' u, '.TBL_AD.' a WHERE u.id=a.userid AND a.userid IS NULL');
function hwDeleteUsers($ql){
global $O_UFS,$db;
$a_ids = array();
$res = $db->query($ql);
if($db->num_rows($res)==0) return 0;
while($v = $db->fetch_assoc($res)){
$a_ids[] = $v['id'];
DeleteRelFiles($v,$O_UFS->A_UPLOAD_DB);
}
$a_ids = implode(',',$a_ids);
$args = array(
'STR_IDS' => $a_ids,
);
hwModEvent('onUserDelete',$args);
hwDeleteAds('SELECT * FROM '.TBL_AD.' WHERE userid IN('.$a_ids.')');
$ql = preg_replace('/^.*?FROM/is','DELETE FROM',$ql);
$db->query($ql);
return 1;
}
?>
#code end
##########################################
As always, any and all help is greatly appreciated.
Thank you in advance.
John