Jump to content

comeandsee

Frost
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • Software
    IPS4
  • Version
    4.3.4

comeandsee's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post
  • Conversation Starter Rare

Recent Badges

0

Reputation

  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...