Re: Simple C API question
Thanks for the response..it was helpful. The information I was missing was that numeric values appear in MYSQL_ROW arrays as null-terminated strings, not as binary data. Travis On 2003.02.26 00:58 Bernhard Döbler wrote: Hi Travis, so far I see, you cannot simply interpret 'length' as the length in bytes of the corresponding byte string in the MYSQL_ROW. Think of the Type VARCHAR. The length member of the FIELD tells you the maximum, the row gives you the string in the actual length. So far I know the Strings in the ROW are zero-terminated so you can use it with ease and the regular C-character-functions. http://www.mysql.com/doc/en/mysql_fetch_row.html Regards Bernhard - Original Message - From: Travis McLeskey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 10:04 PM Subject: Simple C API question Question: Can I reliably interpret 'length' as the length in bytes of the corresponding byte string in the MYSQL_ROW, and is there a usual way to extract these data into regular C datatypes? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Simple C API question
Maybe this is a stupid question but I couldn't find suitable sample code or an answer in the manual. mysql_fetch_row() returns a MYSQL_ROW representation of a row of data. According to the manual, this is an array of counted byte strings. mysql_fetch_field() returns a MYSQL_FIELD with members 'type' and 'length', where 'length' is the width of the field, as specified in the table definition. Question: Can I reliably interpret 'length' as the length in bytes of the corresponding byte string in the MYSQL_ROW, and is there a usual way to extract these data into regular C datatypes? Thanks, Travis - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: problem building mysql as an embedded server
Hi All, I am trying to run mysqld as an embedded server within my application. I have read the manual which says to run configure with --with-embedded-server option, but I have not succeded in building libmysqld.a. It builds all the remaining libs, but I don't find libmysqld.a anywhere within the install directory. The command I used is : ./configure --prefix=/home/dir --with-embedded-server=yes make make install I also tried, ./configure --prefix=/home/dir --with-embedded-server without any success in building libmysqld.a. Is this a bug ? Can anyone please help in resolving this ? Thanks, Ashok I'm guessing you are using the 3.23 source download. It's confusing because the documentation provided with the 3.23 source says that it can be configured with --with-embedded-server but, as far as I can tell, the embedded server was added with the 4.0 release. Anyway, binaries for the 4.0 embedded server are available for download. --- Travis McLeskey - [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php