<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    I'm close I think to passing the multiple arguments.<br>
    <br>
    On a test page, this sql embedded works<br>
    <br>
    &lt;?php<br>
    global $user;<br>
    $result = db_query("SELECT node.uid FROM {node}<br>
    WHERE node.type = 'profile'");<br>
    $member = db_fetch_object($result);<br>
    return "$member-&gt;uid";<br>
    while($member = db_fetch_object($result)){<br>
    print "$member-&gt;uid";<br>
    print ",";<br>
    }<br>
    ?&gt;<br>
    <br>
    I end up with "37, 31, 2"<br>
    <br>
    But I need to use "return" in the argument php code<br>
    <br>
    if I use<br>
    <br>
    while($member = db_fetch_object($result)){<br>
    return "$member-&gt;uid";<br>
    }<br>
    <br>
    at the end, still only the first one is passed, not multiple values.<br>
    <br>
    anyone give me a pointer?<br>
    <br>
    <br>
    <br>
    On 20/11/2010 10:21, Idan Arbel wrote:
    <blockquote
      cite="mid:AANLkTi=2B_Avr0a7gYevyynOa0k7Rxwf0TcWaMhahWC7@mail.gmail.com"
      type="cite">
      <div dir="ltr">if you want to view to take them into account as
        using "AND" then return them like so: 12+32+34, if you want it
        to take them into account as or return them as so 12,32,34.
        <div><br>
        </div>
        <div>don't forget to check to box in the argument settings area
          to accept multiple arguments<br>
          <br>
          <div class="gmail_quote">On Sat, Nov 20, 2010 at 3:14 PM, Neil
            Coghlan <span dir="ltr">&lt;<a moz-do-not-send="true"
                href="mailto:neil@esl-lounge.com">neil@esl-lounge.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
              0.8ex; border-left: 1px solid rgb(204, 204, 204);
              padding-left: 1ex;">
              I have a view where I have selected User:uid as an
              argument and I am<br>
              using a sql query in the "Provide Default Argument" part.
              The problem<br>
              is, usually, the sql query is passing muliple UIDs back.
              How would I<br>
              pass all of them into the argument to be used by the view.<br>
              <br>
              At the moment, the view is only taking the first one.<br>
              <br>
              so, here is a simplified version of my php code:<br>
              <br>
              global $user;<br>
              $result = db_query("SELECT node.uid FROM {node}<br>
              WHERE node.type = 'profile'");<br>
              $member = db_fetch_object($result);<br>
              return "$member-&gt;uid";<br>
              <br>
              on my current db, this returns 3 UIDs...the view only
              takes the first one.<br>
              <br>
              Thanks<br>
              <br>
              Neil<br>
              <font color="#888888"><br>
                <br>
                --<br>
                [ Drupal support list | <a moz-do-not-send="true"
                  href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a>
                ]<br>
              </font></blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
  </body>
</html>