I have a php script with a query that brings me back all books from the books table whos book date meets a criteria (date matches and books.uid <>1). The query worked fine, however when i added the available.AvailableDates it throws an error.
I want to bring the book date back too but as the table that holds the book date is in the subquery it cant find it. Below is the query with the available table and field added and the error:
// get all books from books table
$result = mysql_query("SELECT books.uid, book.name, book.description, available.AvailableDates
WHERE EXISTS (SELECT 0 FROM available A1, available A2
WHERE A1.uid =1 AND A2.uid = books.uid
AND A1.AvailableDates = A2.AvailableDates
AND books.uid <>1)") or die(mysql_error());
Unknown column 'available.AvailableDates' in 'field list'
How can i pull the availabledates column into the select statement?
Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…