faqts : Computers : Programming : Languages : PHP : Database Backed Sites : General

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 6 people (67%) answered Yes
Recently 1 of 3 people (33%) answered Yes

Entry

How can I set multiple conditionals for modifying a database entry?

Dec 6th, 2000 05:12
Paul Kenneth Egell-Johnsen, David Herd, Onno Benschop, Ben Udall,


Your question is pretty vague. Conditionals are handled by if else or
switch case statements:
But from your question you're implying database handling. In most
datebases there are support for functions (triggers) in some language
(differ from db to db). Is that what you're asking?
My final straw is that you want to insert data based on other data? Then
you use relations, create a table/tables with your conditions, then use
SQL to insert into your main table based on the info in the other
tables, something like this:
INSERT INTO main_table VALUES SELECT ConditionID1, ConditionID2 from
condition_table WHERE condition LIKE "%$Condition1%";
(Use = if you're looking for an exact match.)
Next time, be more specific with your question. Exactly what do you try
to accomplish? On what kind of installation (php, apache, mysql? iis,
php, mssql?)
Then try to formulate you question to give people an opportunity to
understand what you're asking.