PHP Query: How to input data into 2 columns column on the same table at different times


Tom D
17/12/2014 7:30 pm
HOME ยป Web Development

So I have an application to save card and the barcode number to user card table. But first, I just want to save the card_id and user_id. And then after that, I will input barcode and barcode_format at different times. This is the simulations :

I choose the card with card ID = 1 and my ID is = 3

My query is :

INSERT INTO user_card (user_id, card_id) VALUES(?, ?)

user_card Table :

id  card_id  user_id  barcode  barcode_format
1      1       3      

and then, after the card that I choose is save in the table, I will add the barcode.

The question is, what's the best approach to do that ?

Is it possible ?

thanks :)


Related to : PHP Query: How to input data into 2 columns column on the same table at different times
PHP Query: How to input data into 2 columns column on the same table at different times
17/12/2014 7:30 pm by Tom D in Web Development

So I have an application to save card and the barcode number to user card table. But first, I just want to save the card_id and user_id. And then after that, I will input barcode and barcode_format at different times. This is the simulations :

I choose the card with card ID = 1 and my ID


I have a table named dmp with 4 columns, I want to query selected data from a column call by parent id
7/5/2016 5:43 am by Hosein Mohtasham in Web Development

table

I have a table named dmp with 4 columns(id, name, dtype and parent), I want to query specific data from a column call by parent id.

I want to display parent n


create MYSQL query to get all contents of a table but xml column data split into multiple columns.
by cubby1223 in Web Development
I know this may sound basic, but I'm scatching my head over this for a wile now. I usually deal with tables of relational data, but this one is tough for me. The table contains a couple of relational columns and one column that holds xml data which I would need to export in multiple columns, rather
SQL query that returns columns form table A plus a bit column that specifies with the PK of table A exists in table B
by jeffrey in Web Development

How can I write an efficient SQL query that returns columns form table A plus a bit column that specifies whether the PK of table A exists in table B? I am using MS SQLServer 2005. Thanks.


SQL query that returns columns form table A plus a bit column that specifies whether the PK of table A exists in table B
27/11/2014 10:41 pm by Rineau in Web Development

How can I write an efficient SQL query that returns columns form table A plus a bit column that specifies whether the PK of table A exists in table B? I am using MS SQLServer 2005. Thanks.


Need MySQL DDL for this flat-file structure, provided sample: input columns, data, output table/columns, etc
by Joe in Web Development

Hacking my way through a problem, and need help creating a valid MySQL DDL for the following. I am trying to load a file containing employee name, the offices they have occupied in the past and their Job title history separated by a tab.


File:


EmployeeName<tab>Off
how to do this query in rails to get search two columns from one table and one column from another table
by MeldarthX in Web Development

I have the following association:


class Resource < ActiveRecord::Base
belongs_to :author


def self.search(search)
where('title ILIKE ? OR description ILIKE ?', "%#{search}%","%#{search}%")
end

I need to search for the author


Mysql query 1 Table same column multiple times
by Marc Dong in Web Development

I'm going crazy on this hope someone can help me out....


I have one Table:


user_skils:
ID | UID | SKILL
1 23 House
2 5 Disco
3 8 Punk
... ... ...
... ... ...
... ... ...

Now Im bui


query--column values as columns in other table
by odunthorne in Web Development
query--column values as columns in other table
 
Hello All,
Can anyone please help me here .
i have data something like
id code value units
1 1 A 10
1 1 B 10
1 1 C 10
2 2 A 20
2 2
SQL that use 3 columns in the same table as input to query
by walshtp in Web Development
Hi,
SQL is not my main area of expertise so I need some help.
I have the following table (PhonePerson) which contains 5 columns:
PersonGUI (PK, Employee ID)
PhoneType (MOBILE,DAY,FAX,HOME)
PhoneID (1=MOBILE, 2=DAY, 3=FAX, 4=HOME)
AreaCode (Area code, ex 415)
P
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2014 © bighow.org All Rights Reserved .