This may be an easy questions but i am wondering if an “insert” sql statement can be writen with equals signs.
Example: Right now my sql looks like this and works fine:
$query = "INSERT INTO people (
id,
name,
) VALUES (
{$id},
'{$name}',
)
So i was wondering if i can write the sql statement like this or something similar to this using = signs:
$query = "INSERT INTO people
id = {$id},
name = '{$site_url}',
Thank you for any help. I am just looking for an easier way to write this code especially when i have a lot of form fields. Thanks.
Yes.
You have to use
SET