Update of a field of PHP database question
Hello
I use a box of selection multiple to allow multuple vales is selected and registered in the database
When I add the deposited values I use implode to separate the values with a comma.
$insertSQL = sprintf ("INSERT INTO finance_data (Link_record, Savings_Year, Savings_Trust, Savings_Type, Savings_Amount, Savings_Additional_Notes) VALUES (%s %s %s, %s, %s, %s)",
GetSQLValueString ($_POST ['inserttracker'], "text").
GetSQLValueString ($_POST ['Savings_Year'], "text").
GetSQLValueString ($_POST ['Savings_Trust'], "text").
GetSQLValueString (implode (',', $_POST ['Savings_Type']), "text").
GetSQLValueString ($_POST ['Savings_Amount'], "double").
GetSQLValueString ($_POST ['Savings_Additional_Notes'], "text"));
When I then use an update method, the value appears correctly in the field, however by using the same implode to update the field in the same way does not seem to work and leaves me rather with value null on update
I tried to use different variables and the implode apart from the update even called something else, but I had no luck
update code
If ((isset($_POST["MM_update"])) & & ($_POST ["MM_update"] == "form1")) {}
$updateSQL = sprintf ("UPDATE finance_data SET Link_record = %s Extended_Index = %s Savings_Year = %s, Savings_Trust = %s, Savings_Type =
"%s Savings_Amount = %s Savings_Additional_Notes = %s WHERE Master_index = %s,"
GetSQLValueString ($_POST ['Link_record'], "int").
GetSQLValueString ($_POST ['Extended_Index'], "text").
GetSQLValueString ($_POST ['Savings_Year'], "text").
GetSQLValueString ($_POST ['Savings_Trust'], "text").
GetSQLValueString (implode (',', $_POST ['Savings_Type']), "text").
GetSQLValueString ($_POST ['Savings_Amount'], "double").
GetSQLValueString ($_POST ['Savings_Additional_Notes'], "text").
GetSQLValueString ($_POST ['Master_index'], "int"));
any suggestions would be helpful
Thank you
Krazy Maud wrote:
When I then use an update method, the value appears correctly in the field, however by using the same implode to update the field in the same way does not seem to work and leaves me rather with value null on update
Have you checked if $_POST ['Savings_Type'] is an array? The name attribute of the multiple select element must have an empty pair of brackets like this:
Tags: Dreamweaver
Similar Questions
-
Impossible to manually update the password field
Hello
I am very frustrated with this issue - I hope that someone can help me please.
For the check of the user, I would like the following flow:
(1) insert record with just the name and the email address (no password).
(2) send an email with the link to a password update page by the way of kt_login_id and randomly generated number in the URL.
(3) page updated password contains the password and password confirm text boxes
This seems like it should be very simple, but I get strange results.
My initial insertion sort page creates an entry for the password field in the database, even if there is no field of password on the Insert page and MySQL initial value must be NULL.
Page updated password is not updated password field.
I fear that MEASURE did something in the background because these updates relate to the connection table.
Thank you!
Steve
Steve_2010 wrote:
My initial insertion sort page creates an entry for the password field in the database, even if there is no field of password on the Insert page...
When you place your page 'register.php' in Code view, is there still the line...
$userRegistration-> addColumn ("password", "STRING_TYPE", "POST", "password");
.. in place, and if so, what happens if you...
(a) delete this line, or
(b) change to:
$userRegistration-> addColumn ("password", "STRING_TYPE", "VALUE", "");
.. which should include at least a value empty (empty) in the password column.
See you soon,.
Günter
-
Access to SQL issues for updating a numeric field
Hello world. I have a publishing page that updates some fields in a database. We just converted all access to SQL. I can update the page very well for the most part, except when I try to update the number of sales for a reason any. I don't know why. I think it has something to do with the SQL database, but I don't know what. The field is called Sales_Order_Number. When I try to enter a number in this field, I get a 500 internal server error. Here's my query I use to display information. on the action page, as well as the update of the table.
We have also updated our MX7 ColdFusion to 11. Not sure if this would make a difference or not otherwise. Can someone please? Thank you.
Andy
< CFQUERY NAME = "ShowContact" Datasource = "#application. DataSource #">"
SELECT the company Company_Name, Middle, First_Name, Last_Name.
ContactID, Contact_Num, ItemID, Item_Num, RFQID, RFQID_SPEC, Entry_Date
Of
(((Contacte LEFT JOIN RFQ_Numbers ON Contacts.ContactID = RFQ_Numbers.Contact_Num))
ON Contacts.Company = Companies.Company_Name LEFT JOIN companies)
LEFT JOIN RFQ_SPEC ON RFQ_Numbers.RFQID = RFQ_SPEC. RFQID_SPEC)
Where ItemID = #form. ItemID #.
<!- and Contacts.RFQ_Num > = 0->
ORDER BY ItemID
< / CFQUERY >
< cfset Form.RFQ_Expected_Value = ReReplace(Form.RFQ_Expected_Value,"[$,abcdefghijklmnopqrstuvwxyz]","","All") >
< cfquery Datasource = '#application. DataSource #">"
Update RFQ_SPEC
The value <!-< cfif IS Entry_Date ' "> Entry_Date = Null,". "
< cfelse > Entry_Date ='#form. Entry_Date #', < / cfif >->
M2M_Quote_Number = < cfif isDefined "(form. M2M_Quote_Number') and #form. NEQ M2M_Quote_Number #.
«"> ' #form.» M2M_Quote_Number #'.
< cfelse >
NULL,
< / cfif >
Rev ='#form. Rev #',
Standard_Part_Number ='#form. Standard_Part_Number #'.
Generic_Description ='#form. Generic_Description #'.
<!-< CFIF IsDefined ("form. GHz_Socket") > = GHz_Socket
#form. GHz_Socket #, < / CFIF >->
Received_By ='#form. Received_By_Initials #'.
Assigned_By ='#form. Assigned_By_Initials #'.
RFQ_Leader ='#form. RFQ_Leader_Initials #'.
Jsquad_Coordinator ='#form. Jsquad_Initials #'.
< cfif IS Complete_Date ' "> Complete_Date = Null,". "
< cfelse > Complete_Date =' #form.Complete_Date #', < / cfif >
Highest_Quantity_Request = < cfif isDefined "(form. Highest_Quantity_Request') and
#form. NEQ Highest_Quantity_Request #.
"" > "".
' #form. Highest_Quantity_Request #'.
< cfelse >
NULL,
< / cfif >
< cfif IS New_Custom_PO_Received_Date ' "> New_Custom_PO_Received_Date = Null,". "
< cfelse > New_Custom_PO_Received_Date ='#form. New_Custom_PO_Received_Date #', < / cfif >
Sales_Order_Number = < cfif isDefined "(form. Sales_Order_Number') and
#form. NEQ Sales_Order_Number #.
«"> ' #form.» Sales_Order_Number #'.
< cfelse >
NULL,
< / cfif >
< IsDefined ("form. CFIF Order_Request") > = Order_Request
#form. Order_Request #, < / CFIF >
Customer_Reason_Rejecting ='#form. Customer_Reason_Rejecting #'.
Budgetary_Quote ='#form. Budgetary_Quote #'.
RFQ_Expected_Value = < cfif isDefined "(form. RFQ_Expected_Value') and #form. NEQ RFQ_Expected_Value #.
«"> ' #form.» RFQ_Expected_Value #'.
< cfelse >
NULL,
< / cfif >
Possible_Status ='#form. Possible_Order #'.
<!-code as if a Sales Order Number is entered, then the State of sales field is registered as 'ordered '. If the Sales Order Number field is empty, then the field sales status will be entered regardless of the drop-down menu has been chosen item.
->
< cfif Sales_Order_Number IS not "" > Sales_Status = "ORDERED", "."
< cfelseif IS Sales_Order_Number ' "> Sales_Status ='#form." " Sales_Options #'.
< / cfif >
Additional_Comments ='#form. Additional_Comments #'.
End_Customer_Name ='#form. "End_Customer_Name #
Where ItemID = #form. ItemID #.
< / cfquery >
ALEXANDER,
Thanks, but what I discovered is that I had to change the entry for the word ordered in single quotes instead of double quotes, so the if statement now reads like this:
Sales_Status = "ordered." Sales_Status ='#form. Sales_Options #'. Thanks again.
-
DMXzone PHP database connector does not connect with any string to localhost mysql
I bought just yesterday 7 or more your extensions to retool Dreamweaver CC 2014.1.1 to manage the dynamic database sites.
My localhost servers... I tried xampp and bitnami... I've already implemented with port 3306 & 3316 to manage 2 mysql servers.
PhpMyAdmin has no problem to connect to one, PHPRunner has no problem, Navicat Premium has no problem and other tools.
But your PHP database connector has yet to work for me I have try the normal mysql presets or use the option of a custom script to communicate with these localhosts.
And the server is localhost, not FTP.
The site is configured in the htdocs/mytestsitefolder to Bitnami / 5.4.38 - wampstack-0
When you use the default connection wizard use localhost or 127.0.0.1
port 3316, name of the comic, user, password.
Then after playing with it some time, put Custom PDO connections, mssqli with no results, I see that you have not updated this connector for versions of Dreamweaver CC.
Your connector will search a path named .../Dreamweaver/
It's been YEARS since asked!
And then when I look at the default connection for mysql method your extension uses only a mysql query that is now obsolete for many years.
My host online uses php 5.5 and I do it at home on my development server.
Or I have to use mysqli can't connect anything I build using your extensions.
This must have been updated a long time ago.
And using custom scripts to enable pdo connector you had better give just an example of what that look ALIKE.
All PDO connection strings that work normally for me no problem do NOT work for the connector of your PHP.
I need a solution as soon as possible or I will have to cancel this purchase.
Thank you very much.
And I'm happy to find an active support Forum where real techies answer!
After that a conversation with thundermex, it turns out that the problem is - the user used a wrong localhost port in its site of DW configuration.
Just some additional info, for all future visitors subject - none of our database tools are based mysql. DMXzone database tools are based on PHP PDO (http://php.net/manual/en/book.pdo.php), PHP PDO is a replacement of the extension mysql of old, obsolete, used in older versions of DW (http://php.net/manual/en/migration55.deprecated.php)
-
upgrades of vcenter 5.0.1b to 5.0.2 (5.0 update 2) includes the schema of database update/upgrade?
Hello
I'd be surprised if there is one, but have you checked with the database audit tool?
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004286 - mentions not required for minor updates but still should be able to run it.
Many tx
-
the form of course update the user field value
Can experts tell me if we can retrieve the data from the form of courses and update the user field. If so, please could you tell me how to do and a simple example will be useful.
Thank you very muchWrite an adapter to transfer and pass the value of the form attribute of the user
How to create a transfer adapter: -.
Name of the adapter:-adapter task of transfer process
Adapter type:-treat stains
Description:-adapter task of transfer process
Variable:-determination of entry (of Type String) during execution
Task of the adapter:-logical task... Adapter--> Variable defined return value--> entry
Save... Build... Compile...
For example, you have created your adapter generic transfer...Suppose that your Mobile is stored in the field of process form Mobile...
In the process definition, create a task... Set the task to transfer adapter process...
entry--> process Date--> Mobile
Return value of--> user definition adapter--> Mobile...It is a very convenient way of transmission data Mobile Process to user profile without writing any custom code
Mark if you find it useful, useful...
-
Dynamically update a numeric field as the sum of the values of page element.
Hello
I am updating a numeric field on a page of the apex by summing the values of several components of the page. I have tried to follow this tutorial http://st-curriculum.oracle.com/obe/db/apex/r40/apexdynactions/apexdynactions_ll.htm, especially the part "create a Set value dynamic Action with the help of PL/SQL'.
In the example of the tutorial, they return a value of page element P3_SAL multiplied by a multiplier determined by the case of another page. What I want to do is much more simple that I just want to add multiple values page element and then display them in a numeric field at the bottom of the page.
so the code I tried to use based on the tutorial is in the tab: Home > Application Builder > Application 103 > Page 3 > Dynamic Action change > create / edit Action
Set type: PL/SQL function body
PL/SQL function body:
BEGIN
return: P3_ITEM1 + P3_ITEM2 + P3_ITEM3;
END;
Page items to submit: P3_ITEM1, P3_ITEM2, P3_ITEM3
But it gives me an error that I need to declare identifiers, and yet it works if I use only one article and I can perform arithmetic.
That is to say.
BEGIN
return: P3_ITEM1 + 1000;
END;
Any help would be appreciated.PL/SQL function body:
BEGIN
return: P3_ITEM1 + P3_ITEM2 + P3_ITEM3;
END;Page items to submit: P3_ITEM1, P3_ITEM2, P3_ITEM3
But it gives me an error that I need to declare identifiers, and yet it works if I use only one article and I can perform arithmetic.
In your code, it lacks the ":" for articles P3_ITEM2 and P3_ITEM3.
Try this:BEGIN return :P3_ITEM1+:P3_ITEM2+:P3_ITEM3; END;
-
Collective update to a field in the data sorted in a tubular form
I do a mass update to a field in the data sorted in a tubular form. I've seen samples where they use Java script, but how can I do the same thing in sql, is this possible?
Again thanks.It is possible to make updates in SQL, but of course after a shipment.
JavaScript changes the values of the form objects, when you use SQL wil you need a way to know what values should be updated and with what value.
You can create a process with this update, which is carried out under the condition of a specific button.Hope this helps,
DickDral
-
Weird database PHP related question
Basically I have a regular page that lists a bunch of candidates from a table:
CandidateID, candidate
Their relationship through a CandidateID details page
On the registration page, I also have a link to a candidate details edit page, using:
[CODE]
< a href = "editCandidateEmail.php? CandidateID = <? PHP echo $row_Candidates ["CandidateID'];? ">" > < img src = "... / Images/edit7.gif" border = "0" width = "28px" height = '18px' / > < / a >
[/ CODE]
That works exactly as it should. So far so good.
On my details page, I have the same exact link to the edit details page, using:
[CODE]
< a href = "editCandidateEmail.php? CandidateID = <? PHP echo $row_Candidates ["CandidateID'];? ">" > < img src = "... / Images/edit7.gif" border = "0" width = "28px" height = '18px' / > < / a >
[/ CODE]
The strange thing is that it works sometimes but not others.
The error is:
You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near "on line 1
And the URL is just the ID of the end of the link, like so:
.. editCandidateEmail.php? CandidateID =
Instead of
.. editCandidateEmail.php? CandidateID = 1234
The recordset is named 'Candidates', and there is a present CandidateID.
No idea as to what could be causing this?
See you soon.Oh! Figured out what was going on - there were two recordsets on the details page, and provided for one join with another table - so if a CandidateID was not present in the other look up table, it has not been referenced by this recordset object - so I just changed the links to make reference to the simple recordset that referred directly to the candidates table.
-
Problem with insert/update statements on the MS Access database
Hi all
Before posting this question, I did a search and found this thread.
I have the same problem as pawel had (in this thread), i.e. cannot insert or update data in the Access database. However, the reason is not that I am using some keywords in my domain name - it has been several years using SQL, some things are 'unwritten' rules But this is the first time I try something in LV
However, after losing all day for work that I expect to do the same morning in 1 hour, try many different options and debugging until the level low in the Toolbox of data base screw (building or higher), I saw some weird SQL statement being trained in-house - so I tried what Troy has tried.
"password" is a reserved word in the Jet. I just looked at MOManagers_M, but by changing the field "password" to 'passworda', it does the job.
-
Hi all
im still new to flash and learn a lot, so please bear with me. I did some research and found you can use PHP to query a mysql database and write an XML file you can draw in flash. My question is that you can use this same approach to images query on a mysql database? I know that some will say this is a bad idea to store images in a database, but for simplicity, I think this is the best approach. IM building a band website that will contain pictures of each show (25-100 photos per show), I was stored in mysql and using php and xml for flash output. Members who will make these updates will just download the database via php uploader and everything is done. not leaving the files. Is the best way to do it, or is there another way to break down each show in a different category and the release of flash via flat files. I hope this makes since, if not, I can try to better explain
in general you save image files in the subdirectories and save image paths in your database.
-
Primary key with PHPmysql database question
I know that the update of the primary key is a taboo subject, but I have a newsletter subscription form set up that works perfectly, but I can't understand how to create the primary key. I tried to use the subscriber email address (because its unique, but when trying to add a function to update, I realize that the e-mail address may have to be updated.)
My question is how do I get a primary key that works when I'm relying on a form variable to create the folder and did so no control over the assignment of one?
Is it possible to have one assigned automatically when a Subscriber clicks on the submit button?
This is why it is always a good idea to use surrogate keys. You can just have the database generates a unique id. In MySQL, I think that there is a column with the auto_increment attribute. If you then get this id after insert, php has functions for this (mysql_insert_id() I think).
-
People of greetings,
just got my refurbished Sansa C250 2 GB. Back to v2. Parameters a 01.01.05P for the version number.
I read somewhere on these forums that even if v2's back, it does not mean necessarily that the player is actually v2. Is this true? How can I tell what version it is?
So should I upgrade to the latest firmware and which?
I plan to buy either a 4 or 8 GB card microSDHC. Advice please.
Anyone who has used linux to update firmware and for all other operations or would I have to use windows?
Thank you
Prasad
Well, since nobody answered my questions, I will answer them myself.
As has been said on this forum and others (http://www.anythingbutipod.com/forum/showthread.php?t=24680), this is the version of the firmware that you use to know the version of your player. Mine is v1. I think another, or should I say a sure way would try to penetrate into the first partition (or the partition to install the firmware) - If your drive is v1, it would be to put your player mode waiting (moved to the rec and orange shows on the left button) press and hold the rec button and plug it into a computer should appear the partition of 16 MB. V2 has a different key sequence.
Since it is highly recommended to upgrade to the latest firmware, I upgraded to 01.01.00P which, by version number appears a downgrade, but it is what is here to... He did bring back the USB menu however.
Since then, I could install Rockbox (http://forums.sandisk.com/sansa/board/message?board.id=c200&thread.id=3396), I'll go ahead and buy a 8 GB microSDHC card. Will post here when I get it to let you know if it worked or not. I think that should be. This post helped me decide to go ahead and buy it: http://www.anythingbutipod.com/forum/showthread.php?t=35302.
I used two Fedora-7 and live CD Fedora-9 (on USB) - no problem.
just something I did - I took a return of my entire 2 GB (after formatting the partition of 2 GB to get rid pictures and music that came on the player). used dd if = / dev/sdc. gzip - c > sansaC250. Also saved the first (16 MB) partition dd if = / dev/sdc1. gzip - c > sansaC250part1. I just thought I might be able to use it if I bricked my drive when rockboxing it. I don't know if restore partitions (or the entire disk) is unbrick it at all. Happy had to use it.
Take advantage of...
-
Better implementation of a callback method to update the various fields?
Hey everybody,
I'm developing an application that uses the Google Translate API. I set it up so that a user can specify a language before you do, and then once they connect, I have wrappers around each piece of text displayed on the screen which will result by the text based on the language selected.
My problem is that several things must be brought on a given screen. Therefore, I need to access Google Translate API several times per screen. To do this, I opened a HTTPConnection on a new thread. So I turn my screen Interface to the translator class, and then the translator class call my callback methods for the screen (requestSucceeded() or requestFailed()).
Now, let's say that I have translated the title of the screen and the screen text. These are two separate HTTPConnections. So, when the title is translated, I want my requestSucceeded() setText method on my LabelField title. When the body of the text is translated, I want my requestSucceeded() setText method on my body LabelField.
What is the best way to have my requestSucceeded() method to differentiate the various fields to be updated? Currently, I'm passing to the translator two things (via a string [] array): the text to be translated and a 'cookie', which describes the element being translated. I then use if statements in my callback requestSucceeded() Update method the appropriate field based on the 'cookie' (which the translator will send in return and the text translated).
I feel like there must be a better way to do this. Does anyone have any suggestions?
Thank you!
I don't know I understand your question, but it seems that this is to decouple the the task of translation of background of the user interface element that is being translated. You're already halfway to decouple the background translator of the mechanism that updates the user interface. What you seem to be missing is a nice way to specify the target of the translation without writing a lot of switch / if statements.
Instead of having a translation callback object that serves several UI elements, you could create a reminder for each UI element. The reminders will always implement the same interface, so the task of the translator background will be not supported. For example, the interface could be something in the sense of:
interface TranslationCallback { void translationCompleted(String translation); void translationFailed(Throwable cause); }
Your user interface would then create a callback object that encapsulates a user interface element (for example, a text field) and implements the TranslationCallback above. Inside of the translationCompleted and the translationFailed logic will not need to understand which element to update, because the reminder is associated with a particular item in a particular category, for example, TextField.
-
Select the value of the field in the database column stores xml as a varchar
Hi all
Oracle version is 11 GR 2.
I have a column of a database in which we store the XML string varchar2.
"I need to extract only newvalue when field nameof the property ="modifiedBy'. '.
In this case my answer would be - maker16
My XML is as below.
with t as ( select '<?xml version="1.0" encoding="UTF-8"?> <changeinfo><property name="checkedOn" newvalue="03/21/2013 15:51:11" oldvalue="03/21/2013"/><property name="modifiedOn" newvalue="07/22/2013 14:04:55" oldvalue="03/21/2013"/><property name="phoneNo" newvalue="9942251"/><property name="modifiedBy" newvalue="maker16" oldvalue="clarissamaker"/></changeinfo>' as datacolumn FROM dual ) select extractvalue(datacolumn,'/changeinfo/property name[@property name="modifiedBy"]/newvalue') from t;
How to write a select statement to get the above result?
Thank you
SID
You can do it like
1. get the name and NewValue as columns and then create a filter with the WHERE clause.
2. or you can filter when you set the path itself.
--I have not applied the WHERE clause to filter the NAME. You can do that. SQL> with t as 2 ( 3 select ' 4
5 ' as datacolumn 10 FROM dual 11 ) 12 select t1.name, t1.newval 13 from t 14 , xmltable 15 ( 16 '/changeinfo/property' passing xmltype(datacolumn) 17 columns 18 name varchar2(100) path '@name', 19 newval varchar2(100) path '@newvalue' 20 ) t1; NAME NEWVAL ------------------------------ ------------------------------ checkedOn 03/21/2013 15:51:11 modifiedOn 07/22/2013 14:04:55 phoneNo 9942251 modifiedBy maker16 --This filters the Name attribute in the path definition itself. SQL> with t as 2 ( 3 select ' 46 7 8 9 5 ' as datacolumn 10 FROM dual 11 ) 12 select t1.newval 13 from t 14 , xmltable 15 ( 16 '/changeinfo/property[@name="modifiedBy"]' passing xmltype(datacolumn) 17 columns 18 newval varchar2(100) path '@newvalue' 19 ) t1; NEWVAL ------------------------------ maker166 7 8 9 And the $ 1 million question would be why VARCHAR2 type of XML data.
Maybe you are looking for
-
Can't find deleted Photo Album pictures
Late 2009 iMac OS X El Capitan, can't very well have this deleted photo album.
-
Hello I hope someone here can help me with this: A light blue highlight appeared in my window chat IM, but only on the words 'this' and 'is '. It affects all entries in conversation if the mine or the people I chat with but it appears only in my wind
-
Re: Toshiba Tempro does not work
When I connect Windows 7 on my laptop, I get a dialog message saying that Toshiba Tempro does not work and that Windows is trying to find a solution, although he never does. I tried delete, by downloading from the Web from Toshiba site and reinstall
-
HP Pavilion dv9000 CTO Notebook PC VISTA Has started one morning, I do not remember any event. It was working fine before 12 h.
-
How to use network variables to transfer data structure C?
I found a CNVStruct in CNVDataType. When calling "CNVCreateScalarDataValue" I always get a message error "the data type is incorrect. typedef struct TestType_t {}float2 int [2];unsigned char Data [16];} TestType. TestType TestData = {{1,2}, "23456"};