CVSTrac Legacy Code

Check-in [d199007454]
Login

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

Overview
Comment:(#823) MAX() isn't a good function to use on numeric values stored as text. "Force" fields to numbers first.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d199007454c92ab5978b886c21ab25ac5607c9c9
User & Date: cpb 2011-02-18 13:43:30
Context
2011-09-13
21:48
Add the "directory:" and "project:" lines to the CGI invocation file to allow operation from a chroot CGI without access to a shell. check-in: 27a4d13d4f user: drh tags: trunk
2011-02-18
13:43
(#823) MAX() isn't a good function to use on numeric values stored as text. "Force" fields to numbers first. check-in: d199007454 user: cpb tags: trunk
2010-11-26
15:55
(#822) add a secondary sort by date as default. Adding a "Sort by date"/"Sort by Relevance" toggle should be trivial from here. check-in: d339dba99a user: cpb tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to svn.c.

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
...
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
  
  /* This query should return only files that are not deleted.
  */
  azTree = db_query(
    "SELECT fc.filename, fc.chngtype "
    "FROM filechng fc "
    "WHERE fc.filename LIKE '%q%%' AND fc.vers=( "
    "  SELECT MAX(vers) FROM filechng fc2 WHERE fc2.filename=fc.filename "
    ")  AND fc.chngtype<>2",
    zTmp
  );
  free(zTmp);
  
  if( azTree==0 ) return;

................................................................................
  */
  while( zDir[0]=='/' ) zDir++;
  
  azTree = db_query(
    "SELECT fc.filename, fc.chngtype "
    "FROM filechng fc "
    "WHERE fc.filename LIKE '%q%%' AND fc.vers=( "
    "  SELECT MAX(vers) FROM filechng fc2 WHERE fc2.filename=fc.filename "
    ")  AND fc.chngtype<>2",
    zDir
  );
  
  if( azTree==0 ) return;

  for(i=0; azTree[i]; i+=2){







|







 







|







76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
...
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
  
  /* This query should return only files that are not deleted.
  */
  azTree = db_query(
    "SELECT fc.filename, fc.chngtype "
    "FROM filechng fc "
    "WHERE fc.filename LIKE '%q%%' AND fc.vers=( "
    "  SELECT MAX(vers+0) FROM filechng fc2 WHERE fc2.filename=fc.filename "
    ")  AND fc.chngtype<>2",
    zTmp
  );
  free(zTmp);
  
  if( azTree==0 ) return;

................................................................................
  */
  while( zDir[0]=='/' ) zDir++;
  
  azTree = db_query(
    "SELECT fc.filename, fc.chngtype "
    "FROM filechng fc "
    "WHERE fc.filename LIKE '%q%%' AND fc.vers=( "
    "  SELECT MAX(vers+0) FROM filechng fc2 WHERE fc2.filename=fc.filename "
    ")  AND fc.chngtype<>2",
    zDir
  );
  
  if( azTree==0 ) return;

  for(i=0; azTree[i]; i+=2){