Jump to content

comeandsee

Frost
  • Posts

    1
  • Joined

  • Last visited

Everything posted by comeandsee

  1. Hello. I'm trying to figure out how to set variables in SQL... I have title, description, start_time, location variables to set... SetKeyField and SetValueField only let you set 2 values... how can I get all 4 to show? Sorry, novice at this. $select = \IPS\Db::i()->select( 'title, description, DATE_FORMAT(StartTime,\'%M %D %Y @ %r (Server Time)\') AS START_TIME, location', 'event_planner' ); $select = $select->setKeyField( 'title')->setValueField('description'); foreach( $select as $title => $description ) { print "<tr><td>$title</td><td>$description</td><td>$START_TIME</td><td>$location</td></tr>\n"; }
×
×
  • Create New...