MYDDAS: New functionalitys to the MYDDAS system

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1541 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
tiagosoares
2006-02-10 23:42:19 +00:00
parent 302495f6c4
commit bc82175e5e
6 changed files with 197 additions and 114 deletions

View File

@@ -311,7 +311,7 @@ c_db_my_number_of_fields(void) {
MYSQL_RES *res_set;
sprintf(sql,"DESCRIBE %s",relation);
sprintf(sql,"DESCRIBE `%s`",relation);
/* executar a query SQL */
if (mysql_query(conn, sql) != 0)
@@ -356,7 +356,7 @@ c_db_my_get_attributes_types(void) {
MYSQL_ROW row;
Term head, list;
sprintf(sql,"DESCRIBE %s",relation);
sprintf(sql,"DESCRIBE `%s`",relation);
/* executar a query SQL */
if (mysql_query(conn, sql) != 0)
@@ -598,10 +598,10 @@ c_db_my_get_fields_properties(void) {
MYSQL *conn = (MYSQL *) (IntegerOfTerm(arg_conn));
/* 1=2 -> We only need the meta information about the fields
/* LIMIT 0 -> We only need the meta information about the fields
to know their properties, we don't need the results of the
query*/
sprintf (sql,"SELECT * FROM %s where 1=2",relacao);
sprintf (sql,"SELECT * FROM `%s` LIMIT 0",relacao);
/* executar a query SQL */
if (mysql_query(conn, sql) != 0)