Menu

#49 ac_store.inc and MS-SQL7

open
nobody
None
5
2001-10-24
2001-10-24
No

I changed "val='%s'" to "val like '%'" because MSSQL7
cannot use variable='values' as a part of WHERE
subquery. val should be also defined as TEXT, not
VARCHAR(xxx). Open file ac.store.inc and change

old:

$squery = sprintf("select count(*) from %s where val
= '%s' and changed='%s' and sid='%s' and name='%s'",

new:

$squery = sprintf("select count(*) from %s where val
like '%s' and changed='%s' and sid='%s' and name='%s'",

Discussion

  • Anonymous

    Anonymous - 2002-07-03

    Logged In: YES
    user_id=279065

    What's he saying? val is defined as TEXT, as far as I can
    tell. Why would one use LIKE with val, but not with the
    other string variables, changed, sid and name?

     
  • Anonymous

    Anonymous - 2002-07-03

    Logged In: YES
    user_id=279065

    What's he saying? val is defined as TEXT, as far as I can
    tell. Why would one use LIKE with val, but not with the
    other string variables, changed, sid and name?

     
  • Nobody/Anonymous

    Logged In: NO

    Check the date of my first comment: 2001-10-24. The 'val'
    variable was varchar at that time.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.