Jump to content

cbearhoney

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cbearhoney's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Got it! Thanks. I changed my code to this and it works: /*Get address detail*/ $result = db_query('SELECT street FROM {terr_master} AS m WHERE tid = %d GROUP BY m.street ORDER BY m.street ASC', $tid); while($data = db_fetch_object($result)) { $streets = $data->street; $result2 = (db_query('SELECT `house`, `apt`, `name` FROM {terr_master} AS m WHERE tid = %d AND street = \'%s\' ORDER BY m.house ASC', $tid, $data->street)); $page_content .= '<strong>' . $streets . '</strong><br/>'; while ($addresses = db_fetch_object($result2)){ $cells = $addresses->house . ' ' . $addresses->apt .' ' . $addresses->name . '<br/>'; $page_content .= $cells; } } return $page_content; I'm actually using placeholders in my query where I escape the streetname string. I didn't show that in my previous post. Thanks again!
  2. I have a function that should display addresses in this format: Streetname House#1 Apt# Name House#2 Apt# Name House#3 Apt# Name It should display multiple addresses under each streetname. My below code only returns the first row and not all results for the street. What's wrong? I'm sure I'm missing a loop somewhere..... (You may see a couple of drupal functions...but you get the idea) $page_content = ''; /*Get address detail*/ $result = db_query('SELECT street FROM {terr_master} AS m WHERE tid = 130 GROUP BY m.street ORDER BY m.street ASC'); while($data = db_fetch_object($result)) { $streets = $data->street; $addresses = db_fetch_object(db_query('SELECT `house`, `apt`, `name` FROM {terr_master} AS m WHERE tid = 130 AND street = 'Flatbush' ORDER BY m.house ASC')); $page_content .= '<p>' . $streets . '<br/>'; $page_content .= $addresses->house . ' ' . $addresses->apt .' ' . $addresses->name; } return $page_content; }
  3. Jakebert, Did you get to finish this project? I'm moving from procedural to OOP programming but I'm a little lost in how to organize my code. I thought your project was a good one to follow.
  4. Is an array of ints data type INT or data type STRING?
  5. I renamed my php.ini file to php5.ini to successfully run the Zend Optimizer. But once I changed this all of my references to the GD2 library stopped - functions like getimagesize() , ImageCreateTrueColor(). What line/file should I change to get GD2 working with php5.ini? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.