TO be plain and simple without the SQL language php wouldnt know what anything was with tables and databases.
So to answer your question, php isnt able to recognise relationships.. Thats why you need to learn SQL to be able to relate them in your queries.