Skip to content
Advertisement

Tag: php

Storing multi rows from php to sql

When i send post from php to save input values in seperate rows i’m ending with that in ma table always is stored extra blank rows. For example this is the form from which i send post to save values: …

Fetching constraints in SQL database to JSON in PHP

Let’s assume I have the following database structure of car manufacturers and the corresponding cars: manufacturers: cars: The id column of manufacturers is the primary key and the manufacturer column of cars has the corresponding foreign key constraint. I’d like to produce the following JSON output using PHPs json_encode: To get the manufacturers and their founded_in I’d just perform: And

Advertisement