Jump to content

CroNiX

Staff Alumni
  • Posts

    1,469
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by CroNiX

  1. If expire is a mysql timestamp, then it's date is in the format yyyy-mm-dd hh:mm:ss. PHP's time() returns a unix timestamp in seconds, like 1411670005.

     

    So this:

    if($row['expire'] <= time()){

    will never be true because you are saying

    if('2014-09-25 11:35:05' <= 1411670005)

    so you'd want to compare it to a date in the same format...

    if($row['expire'] <= date('Y-m-d H:i:s'){
  2. If "student name" is a text field (I assume you mean textarea), then how do you plan on determining the number of students entered into it by the user? It depends on what the user enters...like one name per line (hitting enter after each name), names separated by spaces, names separated by commas.  How do you plan on determining how the user entered the student names into that field if it's entirely up to the user?

  3. I don't use WP, but you can try this:

    function my_sermon_query($meta_key, $meta_value) {
      $query = new WP_Query( array( 'meta_key' => $meta_key, 'meta_value' => $meta_value, 'post_type' => 'mbsb_sermon' ) );
      return $query->posts();
    }
×
×
  • 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.