dudenell Posted December 12, 2007 Share Posted December 12, 2007 im running version 5.0.27-standard this is for a class, I created 4 tables, each with primary and foreign keys to each other. if you have microsoft visio this will be so much easier then the text below, if not get ready for confusion lol (at least on my part) http://www.fileden.com/files/2006/7/27/144624/project_step_2_2_.vsd even better yet I took a screenshot of what my tables look like now what im trying to do is these select statements... All items purchased for each invoice All invoices for each customer All items purchase by each customer All items purchased for each artist with total cost and I have no idea how to go about with these select statements... could you please help? Ill add more information if needed Link to comment https://forums.phpfreaks.com/topic/81405-simple-mysql-help-or-at-least-i-think-it-would-be-easy-for-you/ Share on other sites More sharing options...
fenway Posted December 12, 2007 Share Posted December 12, 2007 this is for a class, I created 4 tables, each with primary and foreign keys to each other. .... and I have no idea how to go about with these select statements... could you please help? Ill add more information if needed No idea at all? Hard to believe.... what class? When did it start? What do you have so far? Link to comment https://forums.phpfreaks.com/topic/81405-simple-mysql-help-or-at-least-i-think-it-would-be-easy-for-you/#findComment-413145 Share on other sites More sharing options...
dudenell Posted December 12, 2007 Author Share Posted December 12, 2007 No idea at all? Hard to believe.... what class? When did it start? What do you have so far? the class is called cis 255 database design and development. umm lets see ill post screenshots of all my tables. the class started in September, this is the final project I know they want me to do select statements with joins and such but I have no idea how to do select statements on these tables with the joins... the first statement im working on All items purchased for each invoice I need to display the invoice number (which is a primary key) and the items purchased on that invoice (most of which is in the items table) ok so these are the tables maybe that will help out? lol help you to help me? btw im trying to create a table (not using the create key) just to display the data i am looking for... Link to comment https://forums.phpfreaks.com/topic/81405-simple-mysql-help-or-at-least-i-think-it-would-be-easy-for-you/#findComment-413189 Share on other sites More sharing options...
dudenell Posted December 12, 2007 Author Share Posted December 12, 2007 I keep getting this error? ??? Link to comment https://forums.phpfreaks.com/topic/81405-simple-mysql-help-or-at-least-i-think-it-would-be-easy-for-you/#findComment-413211 Share on other sites More sharing options...
teng84 Posted December 12, 2007 Share Posted December 12, 2007 show your table structure i guess your joining diff datatypes Link to comment https://forums.phpfreaks.com/topic/81405-simple-mysql-help-or-at-least-i-think-it-would-be-easy-for-you/#findComment-413270 Share on other sites More sharing options...
dudenell Posted December 13, 2007 Author Share Posted December 13, 2007 show your table structure i guess your joining diff datatypes is there a way of doing that without using the up down arrows? I may have overwritten the original create statements to make it easier to write the input statement... Link to comment https://forums.phpfreaks.com/topic/81405-simple-mysql-help-or-at-least-i-think-it-would-be-easy-for-you/#findComment-413380 Share on other sites More sharing options...
teng84 Posted December 13, 2007 Share Posted December 13, 2007 not quite sure but it could be your data types maybe your joining diff fields datatype eg join int form char Link to comment https://forums.phpfreaks.com/topic/81405-simple-mysql-help-or-at-least-i-think-it-would-be-easy-for-you/#findComment-413466 Share on other sites More sharing options...
fenway Posted December 13, 2007 Share Posted December 13, 2007 Yikes, don't post screenshots.. just the text output! :-( You're asking for columns in tables that don't exist, like 'Invoice.ItemID"... of course you'll get errors. Link to comment https://forums.phpfreaks.com/topic/81405-simple-mysql-help-or-at-least-i-think-it-would-be-easy-for-you/#findComment-413483 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.