/ Check-in [7f38f67c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Factor the test for zName==NULL out of the loop. Ticket #1032. (CVS 2164)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7f38f67c7b427ea46db2e95fdfadc1aae064c704
User & Date: drh 2004-12-10 18:00:04
Context
2004-12-14
03:34
Minor code and comment cleanup. (CVS 2165) check-in: d012628a user: drh tags: trunk
2004-12-10
18:00
Factor the test for zName==NULL out of the loop. Ticket #1032. (CVS 2164) check-in: 7f38f67c user: drh tags: trunk
17:17
Fix a problem with the automatic generation of the opcode name table. (CVS 2163) check-in: 9eefabc9 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

587
588
589
590
591
592
593

594
595
596
597

598
599
600
601
int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
  Vdbe *p = (Vdbe*)pStmt;
  int i;
  if( p==0 ){
    return 0;
  }
  createVarMap(p); 

  for(i=0; i<p->nVar; i++){
    const char *z = p->azVar[i];
    if( z && zName && strcmp(z,zName)==0 ){
      return i+1;

    }
  }
  return 0;
}







>
|
|
|
|
>




587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
  Vdbe *p = (Vdbe*)pStmt;
  int i;
  if( p==0 ){
    return 0;
  }
  createVarMap(p); 
  if( zName ){
    for(i=0; i<p->nVar; i++){
      const char *z = p->azVar[i];
      if( z && strcmp(z,zName)==0 ){
        return i+1;
      }
    }
  }
  return 0;
}