Table sorting
Posted on
16th Feb 2014 07:03 pm by
admin
Hi,
I'm trying to modify the following in order to make the output table sorted alphabetically according to $event_name but so far have not succeeded. Any pointers?
Code: function display_all_events(){
global $wpdb;
$events_detail_tbl = get_option('events_detail_tbl');
$curdate = date("Y-m-d");
$paypal_cur = get_option('paypal_cur');
$sql = "SELECT * FROM ". $events_detail_tbl;
$result = mysql_query ($sql);
echo "<table width = '100%'>";
while ($row = mysql_fetch_assoc ($result))
{
$event_id = $row['id'];
$event_name=$row['event_name'];
$event_identifier=$row['event_identifier'];
$cost=$row['event_cost'];
$active=$row['is_active'];
echo "<tr><td width='100%'>".$event_name." - ".$paypal_cur." ".$cost."</p><hr></td><td>";
echo "<form name='form' method='post' action='".$_SERVER['REQUEST_URI']."'>";
echo "<input type='hidden' name='regevent_action' value='register'>";
echo "<input type='hidden' name='event_id' value='".$row['id']."'>";
echo "<input type='SUBMIT' value='REGISTER'></form></td></tr>";
}
echo "</table>";
}
Am relatively new to php so please excuse me for posting stuff that may seem obvious to others but I really need to sort this out as the workaround is very time consuming...
Thanks
No comments posted yet
Your Answer:
Login to answer
297
53
Other forums
Array help
Hello i got this code to fetch data from database but it is not working it displays
7
Array
Problem in OnClientClick and OnClick sync
Hi,Strange and irritating problem:
I have below button declaration in markup of the aspx page:
WORDPRESS - Multiple Loops Only Going to One Post?
I have various pages with multiple loops and i need them to be individual to all other categories.
Track downloads' status
Hello,
I need to make somehow, some system, to track whether downloads are completed or faile
Code doesn't print what i wanted it too. Please help!
Hi there,
I wrote this code to mae it so that in the form before it that the user said their
standard ALV application toolbar, into custom report....
HI,
I have a question regarding displaying standard ALV menu path and application toolbar
extract data
Code: <div class="post hentry uncustomized-post-template">
Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there
MYSQL gen help
This is my Mysql gen. can anyone tell me why this echos
MID(networkset.networkid, 3, 3) AS &q
checkbox update
I am having a brain fart right now and i cant remember how to do this. if anyone could help that wou