Results 1 to 2 of 2

Thread: Query DB and return results in field or table

  1. #1
    kblackwell is offline Sugar Community Member
    Join Date
    Jul 2008
    Posts
    69

    Default Query DB and return results in field or table

    Well, seeing how I don't know if tables can be used in a view, (Already submitted that question and waiting on reply from forum), but if someone can answer that too, would be appreciated.

    But the real question is can someone point me in a direction to find information on returning results from a db query into sugar?

    Thanks in advance.

  2. #2
    matthew's Avatar
    matthew is offline Sugar Team Member
    Join Date
    Jul 2005
    Posts
    533

    Default Re: Query DB and return results in field or table

    something like this:

    global db;

    $result = $db->query("SELECT * FROM contacts");
    while($row = $this->db->fetchByAssoc($result)) {
    print "field value: " . $row['field'];
    }

    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Database Query that return more then 1 value
    By chrislynch8 in forum Developer Help
    Replies: 4
    Last Post: 2009-07-16, 03:22 PM
  2. Could not use a temp table to test query!
    By rexavh in forum Installation and Upgrade Help
    Replies: 8
    Last Post: 2008-10-28, 10:36 AM
  3. query against account table
    By stasila in forum Help
    Replies: 1
    Last Post: 2007-10-15, 07:48 PM
  4. Emails table query slowness
    By rgodoy in forum Help
    Replies: 1
    Last Post: 2007-04-03, 08:23 PM
  5. Replies: 0
    Last Post: 2006-10-27, 10:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •