Skip to content

Tag: mysql

How do I display values from other tables in a database in php?

I am displaying all the items in my database table There is a category table in my database as well that has these values Table item has attributes(ItemID, Name, Price, categoryID(FK)) Table category has attributes(categoryID(PK), Name, Description) Now when I display the items it gets displayed in this order…

how to make a query with database as a variable

I have two databases – lorem and nts.lorem – and need to operate with both of them everything works fine until db is a variable in an ajax request – for example: js php any help? Answer Choose connection according to $db value: