[guadec-web] So the wordpress API doesnt like the tablename public. Lets make this ispublic.



commit e3e3541c8a90ef97d77dd18bc91ddc6bdc6bb515
Author: Patrick Uiterwijk <puiterwijk redhat com>
Date:   Thu Jul 17 18:29:58 2014 -0400

    So the wordpress API doesnt like the tablename public. Lets make this ispublic.

 guadec/access-register.php |    2 +-
 guadec/confirm-payment.php |    4 ++--
 guadec/participants.php    |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/guadec/access-register.php b/guadec/access-register.php
index fa88fac..4af4a95 100644
--- a/guadec/access-register.php
+++ b/guadec/access-register.php
@@ -35,7 +35,7 @@ function display_result($result){
                echo "<td>"; echo $results['accomfee']; echo "</td>";
                echo "<td>"; echo $results['totalfee']; echo "</td>";
                echo "<td>"; echo $results['payment']; echo "</td>";
-               echo "<td>"; echo $results['public']; echo "</td>";
+               echo "<td>"; echo $results['ispublic']; echo "</td>";
                echo "</tr>";
        }
        echo "</table></div>";
diff --git a/guadec/confirm-payment.php b/guadec/confirm-payment.php
index 842fdd1..acafd2c 100644
--- a/guadec/confirm-payment.php
+++ b/guadec/confirm-payment.php
@@ -15,7 +15,7 @@ $sql = "CREATE TABLE $table_name (
   name tinytext NOT NULL,
   email VARCHAR(55) NOT NULL,
   accom VARCHAR(10) DEFAULT 'NO' NOT NULL,
-  public VARCHAR(3) DEFAULT 'NO' NOT NULL,
+  ispublic VARCHAR(3) DEFAULT 'NO' NOT NULL,
   arrive VARCHAR(20) DEFAULT 'NA' NOT NULL,
   depart VARCHAR(20) DEFAULT 'NA' NOT NULL,
   sponsored VARCHAR(10) DEFAULT 'NO' NOT NULL,
@@ -143,7 +143,7 @@ if (!empty($_POST)) {
                                 'gender' => $gender,
                                 'country' => $country,
                                 'payment' => $payment,
-                                'public' => $public));
+                                'ispublic' => $public));
        }
 }
        
diff --git a/guadec/participants.php b/guadec/participants.php
index 64ea1f5..b8923bb 100644
--- a/guadec/participants.php
+++ b/guadec/participants.php
@@ -7,7 +7,7 @@ Template Name: List of participants
 global $wpdb;
 require_once("header.php");
 echo "<table class='regtable'><tr><th>Name</th><th>Location</th></th></tr>";
-$result = $wpdb->get_results("SELECT name, country FROM wp_guadec2014_registrations WHERE public = 'YES' AND 
payment = 'Completed' OR payment ='NoPayment'", ARRAY_A);
+$result = $wpdb->get_results("SELECT name, country FROM wp_guadec2014_registrations WHERE ispublic = 'YES' 
AND (payment = 'Completed' OR payment ='NoPayment')", ARRAY_A);
 foreach($result as $results){
        echo "<tr>";
        echo "<td>"; echo $results['name']; echo "</td>";


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]