question,
i am using perl DBI and have a query from a table called usernames. here is the query... $sth2 = $dbh->prepare("select * from usernames where state = $quoted_the_state order by $the_sort_criteria limit $point, 25") ; i then execute the query, pulling off various columns... $array_ref = $sth2->fetchall_arrayref( [ 0,10,12,16,9,11,14,20 ] ); that works fine. i have another table called pictures, with two columns user and pictures, like below... +--------+------------------------------------------------+ | user | pictures | +--------+------------------------------------------------+ | 189 | aftermath189.jpg | | 189 | OSEIiod189.jpg | | 189 | Isla_de_la_vida_1024189.jpg | | 189 | Sahara_after_rain189.jpg | | 189 | small_oasis189.jpg | +--------+------------------------------------------------+ here is what i want to do. i want to rebuild my sql query to add another column of output. the column would contain a sort of conditional, "does this user have images or not". Yes/No, 1 or 0, anything to let me know. the user, as in this example, can have multiple images so outputting 5 yes's is not needed. is this even possible or should i just build another query, issue it, and past it to the end of the orginal query? matt --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php