Creating an sql query
Hi all :)
I have just begun the Drupal journey. I am wondering where the best place to do what I want is. Want I want is this :
A link on the My Account page which calls all the images a user has posted. ie a user gallery page. It would look something like
SELECT filepath FROM files WHERE userid = SESSION['userid'] and filename = 'thumbnail'; // I found the image link filepaths here
or something similar
then to echo this result into a foreach statement which places the link into an img wrapped in a link to the larger image.
Currently I am stumped at these steps:
- Can I do I do this through Drupal - if so - where? - I would like to use the native system because I want it all to be embedded in the template.
- Would I need to create another page for it to display on?
- I am having trouble understanding nodes and cck - would these play an important role in displaying this kind of information?
The modules I have currently are: cck, devel, gallerix, gallery2, image, imageapi, imagecache, img_assist_2, lightbox2, piclens, tinymce, views and wysiwig. I am doubling up on gallery's because I have been searching for this function but it does not seem to be there.
I would greatly appreciate this help largely because an automatic user gallery is most important to me (uneditable by other users). Thanks in advance :)
