I'm trying to use a MySQL C declaration in PB, but I'm having problems.
If anyone has the know-how and a minute to help, I'd appreciate it.
The C declaration is:
Here's an example of its usage:
Or, if there are any MySQL users who do this another way, please
let me know!
Thanks!!
John
------------------
LOCAL MyEMail AS STRING
MyEMail = "jtintel" & CHR$(64) & "gmail" & CHR$(46) & "com"
If anyone has the know-how and a minute to help, I'd appreciate it.
The C declaration is:
Code:
unsigned long mysql_real_escape_string(MYSQL *mysql, char *to, const char *from, unsigned long length)
Code:
char query[1000],*end end = strmov(query,"INSERT INTO test_table values("); *end++ = '\''; end += mysql_real_escape_string(&mysql, end,"What's this",11); *end++ = '\''; *end++ = ','; *end++ = '\''; end += mysql_real_escape_string(&mysql, end,"binary data: \0\r\n",16; *end++ = '\''; *end++ = ')'; if (mysql_real_query(&mysql,query,(unsigned int) (end - query))) { fprintf(stderr, "failed to insert row, Error: %s\n", mysql_error(&mysql)); }
let me know!

Thanks!!
John
------------------
LOCAL MyEMail AS STRING
MyEMail = "jtintel" & CHR$(64) & "gmail" & CHR$(46) & "com"
Comment