Hello Daniweb Community,
I've been looking around online for help with this but I can't seem to find a way to get a query to do what I want.
The image below should pretty much say what kind of result I'd like to get, it's pretty much merging the tables weather or not the second table has a row with the same ID and if it doesn't then just return NULL.
DROP TABLE IF EXISTS `products`;
CREATE TABLE `products`(
`prod_id` INT PRIMARY KEY
DROP TABLE IF EXISTS `wish_list`;
CREATE TABLE `wish_list`(
`wish_id` INT PRIMARY KEY
INSERT INTO `products`(
,'This is the first product!'
,'This is the second product!'
INSERT INTO `wish_list`(
CREATE OR REPLACE VIEW `exp_result` AS
SELECT w.`wish_id`, w.`wish_account`
, w.`wish_item_id`, w.`wish_date`
, p.`prod_id`, p.`prod_name`
, p.`prod_descr`, p.`prod_price`
, p.`prod_stock`, p.`prod_date`
FROM `products` p
RIGHT JOIN `wish_list` w
ON p.`prod_id` = w.`wish_item_id`;
SELECT * FROM `exp_result`;
And to be quite honest, I feel this is as close to a homework query as you can get... so I didn't feel like answering it outright out of principle. Sorry if my assumption is incorrect, but this is pretty simple stuff for SQL :-/
If you're in one of those predicaments where cls.__private attributes just aren't enough since they can easily be accessed through inst._cls__private, and you need something a little more secure, here's ...