|
Xae posted:
No, the first one only grabs the data from entries where the id matches that what is searched. The second joins the entries, metadata, metafields tables into a single set (that we will now work on), and then grabs from that only the 'set'(that includes metadata/metafields in addition to the entries fields) that is searched. if you had done "SELECT entries.*" in the second you would have gotten the same result as from the first, but there's still a difference in joining tables and filtering from that then doing lookups on an id. I use the first if I just need data from the first table and the others are mere lookups(like in this example) and I use joins when I need data from both tables or are working on master/detail type tables. I do dislike plural names on my tables though, if each row contains only a single entry it should be called entry, and if it contains more then one you need to rethink the whole thing
|
# ¿ Jan 2, 2008 13:55 |
|
|
# ¿ May 3, 2024 16:53 |
|
Freezy posted:I have a string "$string" that will contain data in the same format as the above. I must discover if any line of $string exists in any row, for the column in question. I also must know which line of $string matched successfully. code:
|
# ¿ Jan 3, 2008 11:02 |