DeteCT0R

Profile update Rules

Recommended Posts

Before i buy i need some help :D I have a custome script which is execute when a user buy some stuff. Also i have 2 custome profile field which contain some data(when a user buy something then the script pull some data from custome field).

When i try to setup profile update rules i got 500 error (something really bad) im not a php guru so a little help would be nice :D 

 

$memberid = $purchase->member->member_id;  
				$ingame = \IPS\Db::i()->query("SELECT field_2 FROM core_pfields_content WHERE member_id=$memberid");
		        $member = \IPS\Db::i()->query("SELECT name FROM core_members WHERE member_id=$memberid");
				$pass = \IPS\Db::i()->query("SELECT field_3 FROM core_pfields_content WHERE member_id=$memberid");
		       	while ($row = $ingame ->fetch_assoc()){
		        while ($row2 = $member ->fetch_assoc()) {
				while ($row3 = $pass ->fetch_assoc()) {
					
				\IPS\Db::i()->update( 'ebacore_adminok_awp', array(
						'felhid' => $memberid,
						'steamid'	=> $row["field_2"],
						'nev'	=> $row2["name"],
						'jelszo' => $row3["field_3"]
					) );
			}
			}
			}

Some help would be nice :D This is the script from nexus and i try to modify this to work with Rules :P  (Not the best but its working with commerce)

 

Share this post


Link to post
Share on other sites

Well my webserver does have log yet because i turn off but actually i got 500 error because i try to modify the script which is included in the first post  (that script is for nexus and i try to modify to work with rules ) 

Edited by DeteCT0R

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
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.