|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
i want to pass a verible in mysql_query
i tested following code but compile error came for that String query,acctnbr,amount; accntnbr = [(whatever the variable is)]; amount = [(whatever the variable is)]; query = "insert into tablename (acctnbr,amount) values (%s,%s)",acctnbr,amount); mysql_query(&mysql,query); what is the right and easiest way for that? thanks |
|
#2
|
|||
|
|||
|
Do like so...
$var1 = "4352"; $var2 = 45.00; $query = "insert into table (acctnbr,amount) values ('$var1', '$var2')"; mysql_query($mysql,$query); ------------------ PHP, Perl, SQL Programming at http://www.mentalobjects.com |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > how can i pass veriable in mysql_query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|