![]() |
|
#1
|
|||
|
|||
urgent help needed :c + mysql insertHi
Below is a program that i've written doing an insertion in mysql. It inserts Bob,bibo,bb,yes. My problem is suppose i've to insert a value not directly i.e. to insert the value return by a function. E.g. If the function is returning the name, x=name(); and i have to insert, the value of x or the value return by the function name() in the database, how do i do it? Thanx jack CPP / C++ / C Code:
Last edited by dsmith : 13-Apr-2004 at 21:09.
Reason: Use [c] & [/c] for syntax highlighting
|
|
#2
|
||||
|
||||
|
Hello again Jack.
I have never used mysql in C programming so there may be a better answer, but you could use sprintf to create your query string. So using your code, it could be changed to: CPP / C++ / C Code:
Like I said, there may be a easier or better way to do this, but I see no reason why this wouldn't work. Hope this helps, d |
Recent GIDBlog
2nd Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP, MySQL, WML | skyloon | MySQL / PHP Forum | 0 | 05-Mar-2004 07:53 |
| A problem Between MySQL <> phpBB | mirable | MySQL / PHP Forum | 3 | 10-Sep-2003 05:31 |
| select & delete mysql queries | skyloon | MySQL / PHP Forum | 1 | 22-Jul-2003 13:26 |
| MySQL Syntax Error | DropZite | MySQL / PHP Forum | 3 | 09-Jul-2003 04:00 |
| Windows: From only £20p/y,Linux: from $10p/m. ASP, ASP.NET, PHP, Free MySQL, +More | EyotaHosts | Web Hosting Advertisements & Offers | 0 | 28-Jun-2003 13:54 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The