Click here to Skip to main content
15,917,176 members
Home / Discussions / Database
   

Database

 
GeneralRe: Reading variables in Insert Query Pin
Richard MacCutchan9-Feb-10 6:32
mveRichard MacCutchan9-Feb-10 6:32 
Questiondoubt in multiple criteria Pin
Mogamboo_Khush_Hua9-Feb-10 2:44
Mogamboo_Khush_Hua9-Feb-10 2:44 
AnswerRe: doubt in multiple criteria Pin
Mycroft Holmes9-Feb-10 13:21
professionalMycroft Holmes9-Feb-10 13:21 
AnswerRe: doubt in multiple criteria Pin
WoutL9-Feb-10 20:12
WoutL9-Feb-10 20:12 
GeneralRe: doubt in multiple criteria Pin
Hesham Amin9-Feb-10 20:34
Hesham Amin9-Feb-10 20:34 
GeneralRe: doubt in multiple criteria Pin
Mogamboo_Khush_Hua10-Feb-10 5:31
Mogamboo_Khush_Hua10-Feb-10 5:31 
GeneralRe: doubt in multiple criteria Pin
WoutL10-Feb-10 6:24
WoutL10-Feb-10 6:24 
QuestionProblem with query Pin
gregarion9-Feb-10 2:42
gregarion9-Feb-10 2:42 
Hey guys

I want to insert values into a MySql database. The following line works fine:



mysql_query(connection, "INSERT INTO main (NumofShows , Title) VALUES('12', 'Home')"); 


What i would like to do is instead of having to hardcore the inserted values into the querty, i would like it to read from a variable. For exmaple the data to be inserted is from a string... like....


string NewTitle = "Monaco";
string NumofShows = "2";



How do i edit my sql statements so variables can be inserted into the Insert statement so the query will read the variables and then store their values in the database. Really need some help in this
AnswerRe: Problem with query Pin
loyal ginger9-Feb-10 2:56
loyal ginger9-Feb-10 2:56 
GeneralRe: Problem with query Pin
gregarion9-Feb-10 2:59
gregarion9-Feb-10 2:59 
QuestionAccess 2007 calculation query Pin
Dalek Dave9-Feb-10 1:26
professionalDalek Dave9-Feb-10 1:26 
AnswerRe: Access 2007 calculation query Pin
loyal ginger9-Feb-10 3:03
loyal ginger9-Feb-10 3:03 
GeneralRe: Access 2007 calculation query Pin
Dalek Dave9-Feb-10 3:28
professionalDalek Dave9-Feb-10 3:28 
AnswerRe: Access 2007 calculation query Pin
David Mujica9-Feb-10 3:06
David Mujica9-Feb-10 3:06 
GeneralRe: Access 2007 calculation query Pin
Dalek Dave9-Feb-10 3:29
professionalDalek Dave9-Feb-10 3:29 
AnswerRe: Access 2007 calculation query Pin
Avi Berger9-Feb-10 6:30
Avi Berger9-Feb-10 6:30 
QuestionIncoporate the UDF functionality into the Sp Pin
Vimalsoft(Pty) Ltd9-Feb-10 0:28
professionalVimalsoft(Pty) Ltd9-Feb-10 0:28 
QuestionOracle View Schema Pin
Ahmad Safwat8-Feb-10 6:31
Ahmad Safwat8-Feb-10 6:31 
QuestionA newbie to MySql Pin
Alan Kurlansky8-Feb-10 3:19
Alan Kurlansky8-Feb-10 3:19 
AnswerRe: A newbie to MySql Pin
Eddy Vluggen8-Feb-10 7:22
professionalEddy Vluggen8-Feb-10 7:22 
QuestionQuery help Pin
sarang_k7-Feb-10 19:52
sarang_k7-Feb-10 19:52 
AnswerRe: Query help Pin
Not Active7-Feb-10 20:08
mentorNot Active7-Feb-10 20:08 
AnswerRe: Query help Pin
Andy_L_J7-Feb-10 20:42
Andy_L_J7-Feb-10 20:42 
AnswerRe: Query help Pin
Md. Marufuzzaman8-Feb-10 0:05
professionalMd. Marufuzzaman8-Feb-10 0:05 
QuestionStoring multipe datatypes in single sql server table column.. Pin
Member 41254807-Feb-10 17:08
Member 41254807-Feb-10 17:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.