mysql_free_result(S->result);
S->result = NULL;
}
- if(S->cols) {
+ if (S->cols) {
efree(S->cols);
S->cols = NULL;
}
if (stmt->executed) {
/* ensure that we free any previous unfetched results */
- if(S->result) {
+ if (S->result) {
mysql_free_result(S->result);
S->result = NULL;
}
if (!S->result) {
return 0;
}
- if((S->current_data = mysql_fetch_row(S->result)) == NULL) {
+ if ((S->current_data = mysql_fetch_row(S->result)) == NULL) {
/* there seems to be no way of distinguishing 'no data' from 'error' */
pdo_mysql_error_stmt(stmt);
return 0;
/* fetch all on demand, this seems easiest
** if we've been here before bail out
*/
- if(cols[0].name) {
+ if (cols[0].name) {
return 1;
}
num_fields = mysql_num_fields(R);
F = mysql_fetch_fields(R);
- for(i=0; i < num_fields; i++) {
+ for (i=0; i < num_fields; i++) {
int namelen;
namelen = strlen(F[i].name);
cols[i].precision = F[i].decimals;
{
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
- if(S->current_data == NULL || !S->result) {
+ if (S->current_data == NULL || !S->result) {
return 0;
}
- if(colno >= mysql_num_fields(S->result)) {
+ if (colno >= mysql_num_fields(S->result)) {
/* error invalid column */
pdo_mysql_error_stmt(stmt);
return 0;
zval *flags;
char *str;
- if(!S->result) {
+ if (!S->result) {
return FAILURE;
}
- if(colno >= mysql_num_fields(S->result)) {
+ if (colno >= mysql_num_fields(S->result)) {
/* error invalid column */
pdo_mysql_error_stmt(stmt);
return FAILURE;