Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Joining stuff, the hard way

Joining stuff, the hard way

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharpphpcomquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeroen De Dauw
    wrote on last edited by
    #1

    I guess you come across things such as there rather a lot, but I'm still O_o at it :)

    if ( count( $this->m_query->sortkeys ) > 0 ) {
    $psort = '';
    $porder = '';
    $first = true;

    foreach ( $this->m\_query->sortkeys as $sortkey => $order ) {
    	if ( $first ) {
    		$first = false;
    	} else {
    		$psort  .= ',';
    		$porder .= ',';
    	}
    	
    	$psort .= $sortkey;
    	$porder .= $order;
    }
    
    if ( ( $psort != '' ) || ( $porder != 'ASC' ) ) { // do not mention default sort (main column, ascending)
    	$params\['sort'\] = $psort;
    	$params\['order'\] = $porder;
    }
    

    }

    Can has implode[^]?

    Jeroen De Dauw
    Forums ; Blog ; Wiki

    P 1 Reply Last reply
    0
    • J Jeroen De Dauw

      I guess you come across things such as there rather a lot, but I'm still O_o at it :)

      if ( count( $this->m_query->sortkeys ) > 0 ) {
      $psort = '';
      $porder = '';
      $first = true;

      foreach ( $this->m\_query->sortkeys as $sortkey => $order ) {
      	if ( $first ) {
      		$first = false;
      	} else {
      		$psort  .= ',';
      		$porder .= ',';
      	}
      	
      	$psort .= $sortkey;
      	$porder .= $order;
      }
      
      if ( ( $psort != '' ) || ( $porder != 'ASC' ) ) { // do not mention default sort (main column, ascending)
      	$params\['sort'\] = $psort;
      	$params\['order'\] = $porder;
      }
      

      }

      Can has implode[^]?

      Jeroen De Dauw
      Forums ; Blog ; Wiki

      P Online
      P Online
      PIEBALDconsult
      wrote on last edited by
      #2

      Is that Perl?

      J 1 Reply Last reply
      0
      • P PIEBALDconsult

        Is that Perl?

        J Offline
        J Offline
        Jeroen De Dauw
        wrote on last edited by
        #3

        No, it's the language with the most consistent function behaviour - php.

        Jeroen De Dauw
        Blog ; Wiki

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups