The profile image that I want to display for the avatar is that of User123.
For some reason, my current script is not allowing me to do this - it shows User876's pic instead. I tried switching the join statement to uu.user_id = ut.user_id, but that didn't work either. Any ideas?
related sql:
Code: Select all
SELECT uu.uu_id, uu.user_id, uu.username, uu.comment_id, uu.comment_username, uu.comment, ut.user_id, ut.username, ut.image_data FROM uu JOIN ut ON uu.user_id = ut.user_id WHERE uu.uu_id = $_GET['id']
Code: Select all
if image_data is not empty do this...
<a href="/<?php echo $row_getuu['comment_username'];?>" title="<?php echo $row_getuu['comment_username'];?>"><img src = "http://www.mysite.com/.../<?php echo $row_getuu['comment_username'];?>/<?php echo $row_getuu['image_data']?>"/></a>
... else show default avatar and continue...
Brad