Jump to content

BRYANBRYAN

Members
  • Posts

    14
  • Joined

  • Last visited

BRYANBRYAN's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. what happened i m honest since im not trying to be rude to anyone, any help here will be greatly appreciated.
  2. i wasnt demanding just asking for him to stop pulling me around and acting like a wizard of oz to a total noob, i have no idea what he is asking, this is all the code i have to add entry to a table and it works someone that knows php can figure out the reverse code for it to delete entry from db and code it for me since i already said im stupid for php. im sorry if i sounded demanding but not to get any code written by you gurus in 3 days wasnt expected he is doing it like this, you ask him can u show me how to make pizza, he goes are u using flour in your dough, u say here im using water flour and salt, he goes is your pepperoni beef or chicken, just lay it on pizza, u r like but how do i make pizza, he is like lay it on pizza, and u simply want him to show u how to lay down dough, sauce on it, pepperoni on top and cheese, once u see a completed pizza u know how to make a new one, why is he going around it like rain around Fresno.
  3. why are people on this site not helping, am i doing something wrong?
  4. since Barand wasnt able to figure this one out, any other gurus that know what they are doing that can simply post the right code to unfollow or delete data from database following my pattern of adding it, thanks in advance.
  5. ok once again when i code if(Params::getParam('follow')!='') { if(osc_logged_user_id()!='') { $fav = $conn->osc_dbFetchResult("SELECT * FROM %st_follow WHERE fk_i_seller_id = %d AND fk_i_user_id = %d", DB_TABLE_PREFIX, Params::getParam('follow'), osc_logged_user_id()); if(!isset($fav['fk_i_user_id'])) { $conn->osc_dbExec("INSERT INTO %st_follow (`fk_i_user_id`, `fk_i_seller_id`) VALUES (%d, %d)", DB_TABLE_PREFIX, osc_logged_user_id(), Params::getParam('follow')); } } } when it receives follow it inserts date into database, now i wanted to do delete that same data when it receives unfollow, if u were me what would u wright to remove date u just imputed with this code. im sorry if i sound stupid but im a newbie
  6. ok can u show me how and wright it, because i cant delete simple db entry with this what i wrote
  7. can someone please type this as it should be, thank you
  8. like i said im very new to this especially mySQL am i getting close to right ? if(Params::getParam('unfollow')!='') { $conn->osc_dbExec("DELETE FROM %st_follow WHERE fk_i_item_id = %d AND fk_i_user_id = %d LIMIT 1", DB_TABLE_PREFIX, osc_logged_user_id(), Params::getParam('unfollow')); }
  9. im sorry to bother u but it worked only once, i even removed LIMIT 1 and it wont work any more, hmm? if(Params::getParam('unfollow')!='') { if(osc_logged_user_id()!='') { $fav = $conn->osc_dbFetchResult("SELECT * FROM %st_follow WHERE fk_i_seller_id = %d AND fk_i_user_id = %d", DB_TABLE_PREFIX, Params::getParam('unfollow'), osc_logged_user_id()); if(!isset($fav['fk_i_user_id'])) { $conn->osc_dbExec("DELETE FROM %st_follow WHERE fk_i_seller_id = %d AND fk_i_user_id = %d", DB_TABLE_PREFIX, osc_logged_user_id(), Params::getParam('unfollow')); } } }
  10. it worked, thanks so much Barand, i cant believe i was 1 word away.
  11. ok i created this to add a user to follow list if(Params::getParam('follow')!='') { if(osc_logged_user_id()!='') { $fav = $conn->osc_dbFetchResult("SELECT * FROM %st_follow WHERE fk_i_seller_id = %d AND fk_i_user_id = %d", DB_TABLE_PREFIX, Params::getParam('follow'), osc_logged_user_id()); if(!isset($fav['fk_i_user_id'])) { $conn->osc_dbExec("INSERT INTO %st_follow (`fk_i_user_id`, `fk_i_seller_id`) VALUES (%d, %d)", DB_TABLE_PREFIX, osc_logged_user_id(), Params::getParam('follow')); } } } now i need something to remove user from same list, im new to php and mysql so i tried something like this but it doesnt work if(Params::getParam('unfollow')!='') { if(osc_logged_user_id()!='') { if(!isset($fav['fk_i_user_id'])) { $conn->osc_dbExec("DELETE FROM %st_follow fk_i_user_id = %d AND fk_i_seller_id = %d LIMIT 1", DB_TABLE_PREFIX, osc_logged_user_id(), Params::getParam('unfollow')); } } } can someone please help me make it work, thank you so much.
×
×
  • 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.