WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('in-progress') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('pending') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

ifelif | Loop and Break

ifelif

ifelif allows us to take one action if there are multiple decision points. For example, if you want to take the currency rate of 1 if USD and UKP are not defined, you can write the following program.

Example

#include <stdio.h>
 
#if (defined (USD))                  // B
     #define currency_rate 46
#elif (defined (UKP))
     #define currency_rate 100       //C
#else
     # define currency_rate 1        //D
#endif
 
int main()
{
    int rs;
    rs = 10 * currency_rate;         //H
    printf ("%d\n", rs);
    getchar();
}

Explanation

  1. Statement B includes the ifelif directive. It is similar to the else directive.
  2. #elif appears only after #if, #ifdef, #ifndef, and #elif.
  3. #elif is similar to #else but it is followed by a condition.
  4. You can have as many #elif directives as you want.
  5. If USD is defined, then the currency rate is 46; otherwise, if UKP is defined, then the currency rate is 100; otherwise, the currency rate is 1.
  6. In this example USD and UKP are not defined so the currency rate is taken as 1.

Points to Remember

  1. #elif is similar to #else but it is followed by a condition.
  2. #elif allows taking action in the case of multiple decision points.
Share

You may also like...