Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Wed, 26 Sep 2012 00:28:56 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: Ansi C and MySql - II =?utf-8?Q?topic=E2=80=A6variables?= References: Date: Wed, 26 Sep 2012 06:28:51 +0100 Message-ID: <87ipb1nyi4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:xVLpo4o4ukTucu5gIZPUMSF6yjA= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lines: 17 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-hY9LeIsbCv7kJT46YEt8tXoZHDAyk/1BjK5bwSdI1UIyXaFp84p4tytf1QNIiamhvQB1ImBNsjU7GLi!+/PKbFlTc4/519ruqXwzD1pPc4KzlinZegyxE891ewA8bvQqFBUHzS9wOgqs/6Je0VWO X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1841 Xref: csiph.com comp.lang.c:26706 sim writes: > Now I have another problem, I am creating a Query to update datas into > MySql…I don't know how to put into Query the variables………. Basically, that depends on whether the data can be updated as ASCII or binary blobs. Basically, you need to build up a string (char *) containing your query -- then maybe call mysql_escape_string() -- then pass that to mysql_query() or mysql_escape_query() In either case, C is a pretty grim choice of language to do this in, as dynamic string building (without a third party library) is horribly error prone for new programmers, and merely horribly unpleasant for everyone else. Even the flawed C++ std::string would make this an order of magnitude easier.