Author Topic: Issue Adding Variable Fields  (Read 330 times)

Johndoeno001

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Issue Adding Variable Fields
« on: August 07, 2010, 08:14:32 PM »
The issue I am having is that I want to be able to add all of the rows that start with "event_", here is what I have so far.


PHP Code: [Select]


$result 
mysql_query("SELECT event_* FROM students WHERE studentid = '$sid'") or die(mysql_error());  
while(
$row mysql_fetch_array$result )) 
{


$totalpoints $totalpoints $row['event_*'];
	

}
echo 
$totalpoints;



The reason I need a variable is because there will be more columns added every some often from a panel.