I'm trying to update a table with info from boundValues. Except for the city_id. I need to use the city from the boundValue to get its associated city_id from x
$stmt = $this->db->prepare(
"
UPDATE x_addresses
INNER JOIN x ON x = x...
SET
customer_id = :userId,
first_name = :firstname,
last_name = :lastname,
state = :state,
company_name = :company,
street1 = :street1,
street2 = :street2,
postal = :postalCode,
country = :country,
city = :city,
city_id = x,
region = :region,
WHERE customer_id = $id
"
);
You cant access table column value, unless you have not selected it. In here you can just have update to make sure that this label exists, but you cant select value, you have to do different database query for that.
e.g.
select dbCore.locations_zones_cities.city_id from table where x
update x
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
using PHP how can I add a link to a users landing page to then send them to a sub domain?
tldr: I get the following error with a client/server setup with ssl:
I have a query on my page that retrieves information from the database about rows, adds the values and returns the information
I'm trying to insert some data , but it doesn't work, I´m learning databases with SQL