Jump to content

Recommended Posts

<?php
$q = "Update `Table` Set Approved = '0' Where CreatorID = '"$id."'";
$r = mysql_query($q) or die(mysql_error());
?>

In my back end section users have the ability to add events, but admins can suspend accounts, I want to easily disaprove all their events when they are suspened, will that update all rows, or just one?

<?php
$q = "Update `Table` Set Approved = '0' Where CreatorID = '"$id."'";
$r = mysql_query($q) or die(mysql_error());
?>

In my back end section users have the ability to add events, but admins can suspend accounts, I want to easily disaprove all their events when they are suspened, will that update all rows, or just one?

 

who knows  ;D we dont know your fields and your tables as well so all the answers will be 100 percent guess  ;D

teng you don't need to be so literal, it was a conceptual idea, because I was unsure of the functionality of the SET query.

oopsss sorrrryyy ;D

note always add limit 1  on your query (delete,update) if you only want to edit or delete one record  ;D

<?php
$q = "Update `Table` Set Approved = '0' Where CreatorID = '"$id."'";
$r = mysql_query($q) or die(mysql_error());
?>

In my back end section users have the ability to add events, but admins can suspend accounts, I want to easily disaprove all their events when they are suspened, will that update all rows, or just one?

 

heres how i understand your prob

once you set the accounts of each member to 0 means suspend

 

so i guess all you need to do is update only one record which is the users account then make a join in your select that will join the event poster and the events then have a condition that will only show the events of each member when they are not suspended (0)

 

maybe  ;D

 

 

I don't want to join my events search with the users table to see if they are active

 

want to easily disaprove all their events when they are suspened

 

thats the easiest and fastest way of doing it compare to updating all the events

but still it is up to you! ;D

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.