Link to home
Start Free TrialLog in
Avatar of sganjam
sganjam

asked on

SQL statements, WHERE with a wild card

I am trying to apply some modifications to ikonboard, a perl message board script. It has a few driver modules that handle flatfile databases or mysql databases. In it are subroutines for update, select, query, etc

and update looks somewaht like this:

   $db->update( TABLE  => 'member_profiles',
          WHERE => 'POST_FONT_COLOR < > ikonboard',
          VALUES => { TEST => $iB::IN{'TEST'} },
                       );
IThe subroutine then takes these values and puts together an SQL statement. Now i want to update an entire column with the same value but this ikonboard subroutine does not support that and requires a WHERE feild. I am wondering now, whether there is a way to say, WHERE => is everything in the column. I tried using the operator < > but it didnt work.

Any suggestions?
Avatar of zerofill
zerofill

Try
where => '%'
Or
WHERE => 'POST_FONT_COLOR < > string_that_will_not_be_in_database_in_any_case_098346573'

In my previuos post I mean
where => 'coloumn like "%"'
or something like this.
I am not familiar with this method of generating queries (=>) but the real query generetaed to database must be something like this:
update sometable set somecoloumn="blabla" where somecolumn like "%";

Hope this help
ASKER CERTIFIED SOLUTION
Avatar of erigone
erigone

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Nothing has happened on this question in over 7 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
accept answer by erigone.

Please post any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer