Skip to Content Skip to Menu

Avatar Gallery (was Avatar Matrix) beta released

17 years 6 months ago #37692 by tf5_bassist
Replied by tf5_bassist on topic Re:Avatar Matrix .5 available for download & testi
the query I'm running is:

[code:1]SELECT *, cb_membertype, u.username FROM #__comprofiler WHERE avatarapproved=1 AND avatar NOT LIKE 'NULL' AND banned='0' ORDER BY RAND()[/code:1]

I have almost no clue how SQL queries operate other than basic theory on conditional statements, but I'm just not being able to get anything else to show up other than the cb_membertype bit. when I use the above query, i get "No profiles found", but if I do it without the u.username, it works fine, showing the correct membertype. What should I be using to get at least the first name to show up under the membertype, and preferably city/state as well?

Please Log in or Create an account to join the conversation.

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 6 months ago #37699 by Raj
The SQL is much more logical than the CSS, that's for sure. The CSS doesn't always make sense to me, either, so you're in good company on that one.

Raj

Please Log in or Create an account to join the conversation.

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 6 months ago #37704 by Raj
Hey dude,

Just saw your second message about the query. Let me respond to you tomorrow. Just returned home from traveling and I'm totally zonked and not thinking straight. Back tomorrow.

Raj

Please Log in or Create an account to join the conversation.

17 years 6 months ago #37716 by tf5_bassist
Replied by tf5_bassist on topic Re:Avatar Matrix .5 available for download & testi
Thanks man, I understand the being exhausted thing, I've been that way all day hehe...

So here's what I've got going on right now:
I can NOT for the life of me get something like First Name, or Username, or any name to show up in the matrix. What I can do, however, is create all the fields I want, and those show up just fine. My current query is:

[code:1]SELECT cb_membertype, c.firstname, cb_displayname, u.id, c.user_id, c.avatar FROM #__comprofiler AS c, #__users AS u WHERE c.avatar NOT LIKE 'NULL' AND c.banned=0 AND c.approved = '1' AND c.confirmed = '1' AND (u.id = c.user_id) ORDER BY RAND()[/code:1]

where cb_membertype is the radiobutton, c.firstname should be obvious, and cb_displayname is a text field I created to replace c.firstname in testing. So I've figured out that I don't have a single problem with creating my own fields and publishing those. I just don't know how to use the existing ones I guess.

My thoughts were that if I couldn't get one of the standard fields to display, I'd create a Display Name field, and use that instead of the normal name... However, getting that to show in the profile in substitute is a pain. So...

I guess I just need to figure out how to get Firstname to query and display properly.

Please Log in or Create an account to join the conversation.

17 years 6 months ago #37718 by tf5_bassist
Replied by tf5_bassist on topic Re:Avatar Matrix .5 available for download & testi
nevermind. i think I got it. I was using c.firstname as the field to caption, when I should've been using firstname. omg.

I need a smoke after that. :/

Please Log in or Create an account to join the conversation.

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 6 months ago #37768 by Raj
You got it...Awesome... how about posting the working query so we can all take a look?

Raj

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum