How to use PHP Evalution in rules scheduling I have a rules component that i want to trigger on specific time that is set by end user.
in my case i have a form where user create rental property and select the rent date there. then i have another form of alerts where user can set alerts related to rentals. like user wants alert before 2 days of rental date. I am able to set the rental date but unable to get the value of alerts section to check what value the end user has set to get an alert. I tried to put sql query in 'PHP Evaluation section' but in scheduling section it shows the blank date. Rule that i have creatrted:



component: Schedule reminder to end user
Rule: Schedule rental alerts
action: schedule component evaluation
      data-selector:node:field-rental-start-date
      php evaluation: $query = db_query("SELECT field_days_before_the_rent_value FROM field_data_field_days_before_the_rent");
foreach($query as $result){$res = $result->field_days_before_the_rent_value;}
return $value - $res;

Please help me here how i can get the field_days_before_the_rent_value.
After struggling so many days I found the solution that how we can do scheduling using php evaluation. To do this I have simply pick the value in data selector(under my rule) that is set by user in his rental form as shown in my 1st screen short. Now I need to schedule that rental date according to the alerts set by user in alert section (screen short2) where i was stuck.Under PHP evaluation section we have to use $value variable that returns the value that we selected in data selector.In case of dates  it returns the timestamp not the actual date. So then I used PHP code to add/substract the days according to the user set in alert section and succeed to do scheduling.   

I hope it will helpful for others.