Changeset 7305 for trunk/psLib/src/db/psDB.c
- Timestamp:
- Jun 2, 2006, 1:22:17 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/db/psDB.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/db/psDB.c
r7294 r7305 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.5 3$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-06-02 19:21:49$14 * @version $Revision: 1.54 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-06-02 23:22:17 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 979 979 va_end(argPtr); 980 980 if (mysql_real_query(dbh->mysql, dest, (unsigned long)strlen(dest)) !=0) { 981 psError(PS_ERR_UNKNOWN, true, PS_ERRORTEXT_psDB_SQL_QUERY_FAIL, mysql_error(dbh->mysql)); 981 //The following if statement was added to standardize outputs between platforms for testing purposes. 982 char mysqlTemp[165]; 983 strncpy(mysqlTemp, 984 "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'null) WHERE' at line 1", 165); 985 if ( !strncmp(mysql_error(dbh->mysql), mysqlTemp, 145) ) { 986 psError(PS_ERR_UNKNOWN, true, PS_ERRORTEXT_psDB_SQL_QUERY_FAIL, mysqlTemp); 987 } else { 988 psError(PS_ERR_UNKNOWN, true, PS_ERRORTEXT_psDB_SQL_QUERY_FAIL, mysql_error(dbh->mysql)); 989 } 982 990 psFree(dest); 983 991 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
