Closed StefansArya closed 6 years ago
Add on this line
@StefansArya What would be the key? <>
, ><
, >
, and <
are already taken.
Also, you would also have to edit
https://github.com/catfan/Medoo/blob/6798b9698ee60ee98a4d342485904322922b2b3b/src/Medoo.php#L835
Maybe >~
The regex will be
(\[(?<join>\<|\>|\>\<|\<\>|\>\~)\])?(?<table>[a-zA-Z0-9_]+)\s?(\((?<alias>[a-zA-Z0-9_]+)\))?
@StefansArya Okay then, make a pull request. Catfan then can merge it later
@Andrews54757 @StefansArya No. This feature is acceptable, but please don't make a pull request. We can not make a final syntax decision from now. Need time to think around.
@catfan Yeah, I know that I don't need to create pull request. I already feel it when I dive into your library.. Anyway, thanks for your time!
@catfan I suggest using the PEAR format. It nice and clean, and its easy
I checked out the manual. The LEFT JOIN
is the same as LEFT OUTER JOIN
. So, it don't need to implement the OUTER as option.
Hi, Can you implement LEFT OUTER JOIN for the select API? If a table doesn't contain related id, it will return null instead of empty string..
users
data
Example 1
SELECT "data"."realname","users"."user_id" FROM "users" LEFT OUTER JOIN "data" ON "users"."user_id" = "data"."user_id" WHERE "users"."username" = 'myusername'
Expected output
Example 2
SELECT "data"."realname","users"."user_id" FROM "users" LEFT OUTER JOIN "data" ON "users"."user_id" = "data"."user_id" WHERE "users"."username" = 'otherusername'
Expected output