This is my first post and I have no idea if I put this in the right place, so im sorry if i did not but please bear with me.
I am trying to use a while loop to call views by passing the view a user id as an argument. My code looks like this:

$query = "SELECT * FROM {users}, {users_roles} WHERE {users_roles}.rid = '6'";
$result = db_query($query);
while ($row = db_fetch_array($result)){
?>
[view:dashboard== $row['uid']; ]

}

It is inside of a page. Is this functionality even possible or am I just not able to get it working?

Comments

chrisgadz’s picture

Sorry that posted kind of awkward...

$query = "SELECT * FROM {users}, {users_roles} WHERE {users_roles}.rid = '6'";
$result = db_query($query);
while ($row = db_fetch_array($result)){

[view:dashboard== $row['uid']; ]

}
dawehner’s picture

Version: 6.x-3.x-dev » 6.x-2.x-dev

Do you want to generate some default arguments? I guess you could use the code there.

dawehner’s picture

Status: Active » Fixed

No answer since long time.

This can be done for example with default arguments.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.