Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

SQL statements, WHERE with a wild card

Posted on 2003-03-16
5
Medium Priority
?
213 Views
Last Modified: 2010-03-05
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?
0
Comment
Question by:sganjam
  • 2
4 Comments
 
LVL 1

Expert Comment

by:zerofill
ID: 8150274
Try
where => '%'
0
 
LVL 1

Expert Comment

by:zerofill
ID: 8150338
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
0
 

Accepted Solution

by:
erigone earned 300 total points
ID: 8152289
Choose a condition which is always true e.g. "where 1 = 1"
0
 
LVL 20

Expert Comment

by:jmcg
ID: 9699398
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
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question