Insert behavior query

Hi there
I wonder if anyone could help.
I have an html form which insert data to a mysql db.
I am sticking at a particular point:
I have three tick boxes ( A , B, C ) if left blank the data
in their corresponding db field is 0, if ticked it's 1.
I have three other db fields which I use to check the access
level of a user to partuclar leve in the site ( L1, L2, L3 ) they
are set to 0 by default
if the user tick the A box, it add a 1 to the L1 box so leave
L2 and L3 values are still 0 . all is well and it works
I would like the following, if the user tick B, it should add
the value 1 ot L1 AND L2
and If the user tick C, it should add the value 1 to L1, L2
and L3
to sumarise, Is it possible to write data in 2 or more db
field from the input of 1 checkbox ( if that make sens )
Any advice would be appreciated
CHeers
Chris

Yes it is possible to write a SQL statement that will take
the data and
manipulate it any way that you want, however you will need to
hand code the
whole thing (not that much of a challenge) as the DW standard
behaviours
work on a one to one match.
FYI a checkbox only has a value when it it checked. When
unchecked it simply
does not exist in terms of passing values when the form is
posted.
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"goasduff" <[email protected]> wrote in
message
news:eebp9c$mt6$[email protected]..
> Hi there
> I wonder if anyone could help.
>
> I have an html form which insert data to a mysql db.
>
> I am sticking at a particular point:
>
> I have three tick boxes ( A , B, C ) if left blank the
data in their
> corresponding db field is 0, if ticked it's 1.
> I have three other db fields which I use to check the
access level of a
> user
> to partuclar leve in the site ( L1, L2, L3 ) they are
set to 0 by default
>
> if the user tick the A box, it add a 1 to the L1 box so
leave L2 and L3
> values
> are still 0 . all is well and it works
>
> I would like the following, if the user tick B, it
should add the value 1
> ot
> L1 AND L2
> and If the user tick C, it should add the value 1 to L1,
L2 and L3
>
> to sumarise, Is it possible to write data in 2 or more
db field from the
> input
> of 1 checkbox ( if that make sens )
>
> Any advice would be appreciated
>
> CHeers
>
> Chris
>
>
>
>
>
>
>
>
>
>

Similar Messages

  • Fetch Insert / Update Query From Table Trigger

    Hi everyone !,
    I have a situation, is there any way where I can get insert/update query by before-insert / after insert trigger when a user inserts/updates any row in the table.
    Plz....help me....champs.....
    Regards,
    Naushad

    That was a nice thing but it works only on some oracle 9i with DML statements.
    On database versions 9.2.0.1 to 9.2.0.6 ora_sql_text works and returns the calling text for dml triggers, where as starting from 9.2.0.7 the behavior has changed and returns NULL.
    Cause
    This issue had surfaced from 9.2.0.7.0 patchset. After discussions in Bug 4171597 which was closed as a duplicate of Bug 4230721 it was concluded that it was the expected behavior i.e ORA_SQL_TXT should return null when dml triggers are used.
    ORA_SQL_TXT is a "System defined event attribute" and is supposed to work only with "System triggers". This is also what the Documentation says - "Application Developers Guide : Fundamentals(9.2)
    Chapter 16 Working with System events".
    Bye Alessandro

  • SELECT * cannot be used in an INSERT INTO query when the source or destination table contains a multivalued field

    Hi,
    I am using Access 2013 and I have the following VBA code, 
    strSQL = "INSERT INTO Master SELECT * from Master WHERE ID = 1"
     DoCmd.RunSQL (strSQL)
    when the SQL statement is run, I got this error.
    SELECT * cannot be used in an INSERT INTO query when the source or destination table contains a multivalued field
    Any suggestion on how to get around this?
    Please advice and your help would be greatly appreciated!

    Rather than modelling the many-to-many relationship type by means of a multi-valued field, do so by the conventional means of modelling the relationship type by a table which resolves it into two one-to-many relationship types.  You give no indication
    of what is being modelled here, so let's assume a generic model where there is a many-to-many relationship type between Masters and Slaves, for which you'd have the following tables:
    Masters
    ....MasterID  (PK)
    ....Master
    Slaves
    ....SlaveID  (PK)
    ....Slave
    and to model the relationship type:
    SlaveMastership
    ....SlaveID  (FK)
    ....MasterID  (FK)
    The primary key of the last is a composite one of the two foreign keys SlaveID and MasterID.
    You appear to be trying to insert duplicates of a subset of rows from the same table.  With the above structure, to do this you would firstly have to insert rows into the referenced table Masters for all columns bar the key, which, presuming this to be
    an autonumber column, would be assigned new values automatically.  To map these new rows to the same rows in Slaves as the original subset you would then need to insert rows into SlaveMastership with the same SlaveID values as those in Slaves referenced
    by those rows in Slavemastership which referenced the keys of the original subset of rows from Masters, and the MasterID values of the rows inserted in the first insert operation.  This would require joins to be made between the original and the new subsets
    of rows in two instances of Masters on other columns which constitute a candidate key of Masters, so that the rows from SlaveMastership can be identified.
    You'll find examples of these sort of insert operations in DecomposerDemo.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    In this little demo file non-normalized data from Excel is decomposed into a set of normalized tables.  Unlike your situation this does not involve duplication of rows into the same table, but the methodology for the insertion of rows into a table which
    models a many-to-many relationship type is broadly the same.
    The fact that you have this requirement to duplicate a subset of rows into the same table, however, does make me wonder about the validity of the underlying logical model.  I think it would help us if you could describe in detail just what in real world
    terms is being modelled by this table, and the purpose of the insert operation which you are attempting.
    Ken Sheridan, Stafford, England

  • How to insert a query into a NEW workbook ?

    Hi Friends,
    Could some one tell me how to insert a query into a new workbook? i am trying to run query in NW2004S BEx Query Designer, which always open the query on web when executed. i want to run the query in NW2004S BEx Query Designer and want it to open the result in Excell.
    If i am not wrong then to do the same, i need to embed the query into workbook. Correct me if i am wrong. If i am right then plzz tell me the steps to insert the query into workbook.
    Ur help will be rewarded in terms of points.
    Thanks,

    Hello,
    If you open the BEx Query Designer from the desktop, you cannot execute the query directly to the BEx Analyzer for an Excel view. You can only execute it directly to the Web. This is true for the SAP BW 3.x version as well as the SAP NetWeaver 2004s version.
    If you open the BEx Query Designer from within BEx Analyzer, once you select (or create) your query, you will have a green check mark icon that will then allow you to deploy the query directly to the BEx Analyzer for the Excel view.
    However, this would only make sense if you are creating or modifying the query. If not, you would simply open BEx Analyzer and use the Open Query option in this tool to see your query in an Excel format, as has been previously suggested by the other respondents to this posting.
    Regards,
    Katie Beavers
    SAP NetWeaver Product Management

  • Very slow insert and query

    Dear Professionals:
    The insert and query become very slow and somtimes hang. It wasn't like this before .. Network people added 100 pc to the network .. most of them not using the databse only internet and we are all in the same network .. Can this slow down the database Oracle 9.2.0.1.0 OS w2k server ? And how to know that the slowness is from network and not from query or inserts ?
    Ahmed.

    Hi,
    >>Network people added 100 pc to the network .. most of them not using the databse only internet. Can this slow down the database Oracle 9.2.0.1.0 OS w2k server ?
    Maybe yes, maybe not, maybe a network performance problem ...
    If you try to execute these DML's (insert, ...) and querys directly on the Server, what's happen ?
    Cheers

  • Report Designer - Issue in inserting the query

    Hi
    I'm facing problem when inserting the query in the Report Designer. Following is the steps I take to create new report in report designer.
    1. Developed the query in Bex Analyzer.
    2. Click on new in Report Desginer.
    3. Click on 'Insert Data Provider'.
    4. And at this point it self system throw a message saying that "Do you really want to delete this section? Query will be removed if it is not used in any other section.'
    Has anybody come across thos type of issue.
    Please advice if I'm going wrong any where.
    Regards
    Rohini

    Hi,
    You mean you have created query in query designer right....
    because a query/workbook.query view created bt Bex abalyzer can't be a data taregt for report designer
    Cheers,
    Swapna.G

  • Error When inserting Content Query Web part onto the page

    i am using share point 2010 and when i am trying to insert content query web part onto the page i am getting the following error
    i checked the correlation id in the logs file but could not find anything useful in it.
    please suggest why this problem occuring everytime when i try to insert content query webpart onto the page

    Hi,
    Check the correlation id in your logging files are the best way to investigate.
    Did you check these files with "SharePoint ULS Log viewer". Maybe, that will be more easy for you to get the correlation Id.
    Moreover, check the account's permissions with which you try to insert your webpart.
    Regards.
    Gilles Martinez
    Twitter
    Blog
    Please mark as helpful/answer if this resolved your post

  • Steps to create workbook and need to insert 10 query's in the workbook

    Hi,
    Please let me know Steps to create workbook and need to insert 10 query's in the workbook.
    Thanks,
    rajesh b

    Hi,
        Creating Workbook ---> Open your query --> save it as a new workbook -->provide description for workbook -->If you want more queries into the same workbook then insert related queries into different different sheets by insert query from Tools menu .
    Regards
    Pcrao.

  • PWA 2013 "Add a new task" - inconsistent task insertion behavior

    Hi all!
    New to the forum and wondering if anyone out there has insight into what I've encountered with the "Add a new task" feature in on-prem Project Server 2013.  
    First some context... I am setting up 12-month projects for different teams to forecast and log their administrative and reactive time for the year.
     We are tracking this within enterprise projects.  The projects have a series of summary tasks that serve to categorize work.  There is a placeholder task within each summary task that establishes duration and where we may assign generic resources
    to establish a baseline cost for the 12 month period for that category of work.  The vision is for team members to go to their PWA Tasks list, "Add a new task", select the project and the summary task to categorize and add their new task to
    the project, enter the task information, and submit for approval.  
    My issue appears when the Project Manager approves a task and opens the project in Project Professional because the system appears to exhibit inconsistent
    behavior - Scenario 1 vs Scenario 2 below.  
    Scenario 1 – Project structure prior
    to adding a new task:
    Project Summary Task, 260d
    -Summary Task, 260d
    --Placeholder Task, 260d, generic resources assigned, ID=n
    -Summary Task, 260d
    Team member adds a new task and submits.  The new task is inserted as a child task to the summary task selected when adding
    the new task.  This is what PWA Approval Preview shows and what is found when file is opened in Project Professional:
    Project Summary Task, 260d?
    -Summary Task, 260d?
    --New task just added, 2d?, named resource assigned, ID=n
    --Placeholder Task, 260d, generic resources assigned, ID=n+1
    -Summary Task, 260d
    Scenario 2 – Same project structure as scenario 1... team member submits a new task
    and the new task is inserted per below.  This is NOT what PWA Approval Preview shows.  PWA shows the new task as a child of the summary task.  Once approved and the file is opened in Project Professional, the task instead reflects as a child
    task to the placeholder task, and impacts the duration of the original summary task:
    Project Summary Task, 260d?
    -Summary Task, 2d?
    --Placeholder Task, 2d?, generic resource assignments, ID=n
    ---New task just added, 2d?, named resource assigned, ID=n+1
    -Summary Task, 260d
    I am using separate project files to produce the scenario, and as far as I can tell they are set up exactly the same, but one file consistently produces
    scenario 2 behavior and the other consistently produces scenario 1 behavior. It seems that something is different between the two files and causing the issue, but I can't figure out what it is.  
    Any idea what I could do to establish consistent (preferably Scenario 1) task insertion behavior from PWA?

    Anyone else running into this?  We're now on the April CU and still experiencing this apparent bug.  I've replicated it in different PWA instances using "Add a new task" from both the timesheet and tasks.  
    It only happens on certain projects as Greg mentioned... One way we've been able to pinpoint where it's taking place:  since the bug causes a task to become a summary task, and since most of our tasks have assignments, if a project contains any summary
    tasks with assignments, those may be an early indicator of the bug (after we rule out PM-induced summary task assignments).  
    We're seeing this impact our project actuals and reports, so there is a fair amount of going back through approval history and restoring actual hours to the correct calendar dates in the Project Client.  Not ideal, because we are planning to lock that
    capability down in the near future.
    On a whim, I tried using the "Save for sharing" method to fix the issue, and new tasks appeared to insert correctly after that.  Seems OK for a workaround (we'll see how durable it is), but better yet would be consistent new task insertion
    behavior.

  • Insert and query buttons missing on qbe customize

    I created a simple qbe report and enabled update, delete, insert, and query. If I use the 'customize' link on the portal development screen for the qbe, it gives me the insert and query buttons. But as a portlet added to a page, if you click on the customize at the top right of the qbe portlet, it omits the insert and query buttons. Why does this happen? In each case I am logged in as the same person. I even played with the priviledges, to no avail.
    Any suggestions?

    Hi Steve ,
    In Qbe Report the update , delete , insert buttons are for full page mode and will not appear in portlet mode .
    The portlet mode customization can only be used to change the data appearing in the report (this is in consistent with the other kinds of reports )
    As a work around a form can be provided to insert and update the data .
    Regards
    Medini

  • Insert then query

    I have a small CFM application on our server. It worked well
    for several years. However, we just upgraded the coldfusion server
    and one item is not working.
    I used to have folks fill out a form. The data was inserted
    into the database. I would query the database on the same page in
    which I did the insertion and all was fine....every record was
    available.
    Now, however, when I query the database after the insertion,
    all records up to the lastest insertion are reflected. In other
    words, the page insertion data is not reflected in the query.
    However, the data is successfully inserted. (Inspection with other
    methods indicates the data was successfully inserted.)
    Here is a scaled down code snippet.
    <cfinsert datasource=#WList_DSN# tablename="Wait"
    formFields="Fname,
    Lname,
    Snumber,
    Course,
    Password,
    Phone,
    Email">
    <cfquery name="get_position" datasource=#WList_DSN#
    username=#WList_USERNAME# password=#WList_PASSWORD#>
    SELECT ID, Fname, Lname, Snumber, Phone, Email FROM Wait
    WHERE Course = '#form.Course#'
    ORDER by ID
    </cfquery>
    <html>
    <head>
    <title>Test Page</title>
    <body>
    <cfoutput query="get_data">
    #FNAME# #LNANE#<br>
    </cfoutput>
    </body>
    </html>
    #FNAME# and #LNAME# in the output show each record in the
    database except for the one just inserted. Is there a way to remedy
    this? I want to conduct the query on the same page as the
    insertion, if at all possible.
    Any help would be greatly appreciated.
    Thanks...

    Thanks guys. I had a feeling the database might be updating
    slowly so I placed a pause between the insert andf query. The code
    then performed like before. I have incorporated the somewhat
    awkward 5 second pause between insert and query into the final code
    and things are working okay.
    I'm amazed, though, that the software update took a near
    instantaneous database update and slowed it to a nearly 5 second
    update situation.

  • Need Sample Code in C#  to Insert,Update,Query data using W 2.0 wsdl

    Hi,
    Can anyone please share sample code in C# to Insert,Update,Query data using W 2.0 wsdl.
    Thanks in advance

    I have found solution.
    Need add following line for non string data type.
    objOutreachUpdateList.Opportunity[0].IndexedNumber0Specified = true;

  • An interesting problem with DW insert behavior

    I've recently realized that the Insert behavior allows for
    certain
    problems.. for example,
    http://www.websitenamehere.com/register.asp?MM_Insert=Registration
    will insert a null record since the querystring MM_Insert
    having the Value
    of Registration will set up all the conditions necessary to
    insert a record
    without validating any data.
    I know this because I recently had 200 null records suddenly
    show up in the
    database.. any suggestions for how to avoid this? Anyone?

    We have done a lot in the field of xsl:fo but not for BIP but for FOP. I've had the same problem for some reports but in the end I gave up and used jasperserver. I find it a little amusing that the same problem of FOP exists in BIP...
    Jasper reports is completely java based and can convert to all formats BIP can. It can also read html from clobs and convert it for your reports.
    Another advantage is that it's free. The downside is that imho there are still some bugs in the jasperserver and it's quit hard to install. But once it's running it's great...
    Br,
    Nico
    Edited by: NicoMartens_InterAccessBE on 16-mei-2011 14:51

  • Inserting a Query into Portal

    Hi All,
    For the First time i got a chance to work on portal.
    Now i need to insert a query into portal..Before that i want to know the whole process.
    I have searched in SDN for this creteria...but found some different answers and i got bit confussed.
    So requesting all to let me know the whole procedure that means
    1.what are the settings to be done to execute the report through portal(Required Installations....etc)
    2.How to insert a query into portal....
    if any document is there which gives fundamental idea about portal and inserting query into portal , Please share with me.
    regards
    Saha

    Hi Saha,
    If you are executing queries on portal from role menu then in this case you need to change the URL of report in menu role. This can be done using transaction PFCG. Here you need to maintain the URL format which will point to the Java stack in portal.
    if you are executing the reports on portal by clicking on the Infoarea where you can select queries by infoprovider, you need not to do any setting.
    To execute report on portal you will need to have Business Intelligence role on portal.
    Regards,Niraj

  • Doing an insert behavior in Dreamweaver CS five and Access?

    so there I am doing  an Insert Record into a table  in Access. I have used this behavior before and have had no problem. When I am doing a form element type selection (for each field in the record) I have no problem – except for the second field. The default value <ignore >cannot be changed: there is no drop-down list as there is with every other field. I have tried changing the name of the field (from Fullname to Fname) thinking that this might be a reserved word problem, but it is not. What could be the problem and what might be the solution?
    Thanks!
    Ross

    I've attached a screenshot might depict my dilemma a little more thoroughly: about a picture being worth 1000 words? With this I double clicked on the insert behavior. Notice the "insert into column" drop box which has the phrase <ignore > highlighted?I want to have  fname inserts into fullname but I cannot do so. I have tried changing the field name in the  Access database itself but it makes no difference. I have even tried setting it to a bogus value – one on the list – but I get complaints at runtime about the same input field be stuffed into two columns. So how do I get the actual field name for the column, Fullname, instead of the <ignore >??
    Ross

Maybe you are looking for