linking two tables in MySQL error

Realme

Active member
Joined
Jul 2, 2019
Messages
33
Programming Experience
Beginner
hi, I have made really simple tables but when calling them some error occurs, let me explain:

I have made one simple table named "Classics" with 5 books, including authors, title, year and isbn and i have made another table called "customers" including name,title and isbn.

to problem:

I link these together and want to call them but does not work i do this as following:

select name,author,title,isbn from customers,classics where customers.isbn=classics.isbn;

does not run

but when i do as follwing it does run:

select name,author,title from customers,classics where customers.isbn=classics.isbn;

why does it not run together with isbn?

error code: "Column 'isbn' in field list is ambiguous"
 
Okay I solved the problem by following:

select name,author,isbn,title from customers natural join classics;
 
Looks like a SQL question. Why is this in the C# forum?
 
I'm just not seeing the C# connection here. The problem is the query above is purely a SQL problem -- not something about how MySQL interfaces with C#.
 
Looks like you're trying to select from two locations where they already exist. You need to be more specific when writing out your command queries. Also put some effort into your T-SQL keyword capitalisation, it helps with readability. Like this ex. "SELECT id FROM UserRegistration WHERE username=@Username"; and begin with using parameters as you've been here before on this subject with me...

I too don't know why you are using this forum for MySQL C# related questions when your project is clearly meant to be geared towards php, javascript and MySQL as the book suggests, NOT C# MySQL. Wouldn't you be better dedicating your php related questions on a php specific forum, and not mixing up the two completely different frameworks in your php project?

I'd have thought you would have known the difference between these two at-least, and know better than to ask for advice on a topic in which your integrated language is not the same as you're asking for. The reason this is an issue for me, is because somebody may give you a full blown code example in C# to test with, and you won't know how to integrate that with php. And then we will end up in one of your infinite topic loops which will never end; and that's because of your shotgun approach to learning everything and your arrogance towards people who give you courteous time and practical advice which you always ignore.

you certainly pick the hardest way to learn things. Just sayin'
 
Last edited by a moderator:
Well it would also help using with C# as I know more c# than pho right now. Also I will also use this on c# so it doesn't bother if I learn how to apply on c#. As I might in future only prefer applying on c#.

Also it is not headshot approach, you can't learn by reading what others say. I try on my own and I learn much more then. If I know what is wrong by trying then I know what is more likely right
 
Last edited by a moderator:
My dear. There really is no talking to you at all.
you can't learn by reading what others say
I'm trying to get you to do the right thing by yourself.

If you don't read how something works, you can't begin to use it correctly. You're following the curriculum instructions of a php based book and applying c# to it. How is that helpful to learning php?

Its bad enough that you're mixing the two when you haven't ever covered the basic fundamentals of c# either. That is a shotgun approach to learning and its wrong.

Do you tell your school and course providers that you don't need their books, and you'll work it out without them?

Googling or asking for answers to questions you wouldn't need to ask, had you read and stuck to your study books is not learning, its getting by without understanding why something works the way it does. That's what reading teaches you.
 
Last edited:
My dear. There really is no talking to you at all.

I'm trying to get you to do the right thing by yourself.

If you don't read how something works, you can't begin to use it correctly. You're following the curriculum instructions of a php based book and applying c# to it. How is that helpful to learning php?

Its bad enough that you're mixing the two when you haven't ever covered the basic fundamentals of c# either. That is a shotgun approach to learning and its wrong.

Do you tell your school and course providers that you don't need their books, and you'll work it out without them?

Googling or asking for answers to questions you wouldn't need to ask, had you read and stuck to your study books is not learning, its getting by without understanding why something works the way it does. That's what reading teaches you.
When I was learning C# I told my teacher I will learn c# without book and I will get the info needed from Microsoft and he said that is okay as long as I learn. Later I got C in C#.

But now I asked if I can do the same with php MySQL and he said it is not okay as there are necessary info in the book. I so download the 800 pages php MySQL book as you also refered to is the same book.

Also I am studying distance courses I am not even in class I am in Bulgaria right now. This course is also 30 days later next month I will start following course server programming 2 also in 30 days

I started to read the book 5 days ago and I am currently at page 230. Next month I need to have read all 800 pages and understood in 60 days total
 
Last edited:
Back
Top Bottom