Hello, Gigi, By "decoded", do you mean that you want the words "Author" and "Publisher" to appear in your table instead of "1" and "2"? And you can't create or modify tables? Short of replacing the codes in the columns, it seems to me that you'd need to have a decode table. Something like:
+------+-----------+ | code | type | +------+-----------+ | 1 | Author | +------+-----------+ | 2 | Publisher | +------+-----------+ Right? Without this, or without inserting the actual values, or without running conditionals in PHP or whatever environment you're accessing the data in, you might be stuck. Maybe someone else has an idea... HTH, Jed I liked it when Gigi Di Leo wrote this to me: > Hello list. > > I have to interface a database, which I cannot modify because it is maintained > somewher else, where there are two tables: > > BOOKS > author_code > publisher_code > book_title > > BASIC_DATA > code > description > record_type > > In the table BASIC_DATA records are classified on the flag value: > flag=1 -> record is about Authors > flag=2 -> record is about Publishers > > Could you please suggest me the best query syntax to get BOOKS' data with > Authors and Publishers decoded ? > > Thank you very much for your help. > > Gigi Di Leo > > > --------------------------------------------------------------------- > 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 > > --------------------------------------------------------------------- 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