[Quebec] How to express the variable in this example?
I want to know how to express this variable in this example in the red part
/ * Variable * /.
$old = ['old'] $row_rs_archive;
$new = $row_rs_archive ['new'];
$total = old + $nouveau;
echo $total;
If (array_key_exists ('must', $_POST)) {}
$done = mysql_query ("UPDATE cur_total SET temp = $total'") or die (mysql_error ());
}
works fine echo and enter the value total, but in the UPDATE command, it does not.
I get this error
1500 unknown column '$total' in 'field list '.
notice of 1500 just echo $total
Thank you...
I took a quick glance, but I suspect it's because you use single quotes for the query string. PHP will not analyze the variables in single quotes, and he will treat it as a literal string.
Try this:
$done = mysql_query ("set a DAY cur_total SET temp = $total") or die (mysql_error ());
If that is not quite get you there, try rather concatenation.
Tags: Dreamweaver
Similar Questions
-
How to get the return in this example
Hi all,
In this simple example, is there an exception caused by the business logic. However, I would like to get the return value of 'p_dt' which will be stored in a table of newspaper, but when the exception occurs that the value is eliminated. How can I solve this? Thank you for your help.
SQL> select * from v$version where rownum = 1; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
Kind regardscreate table test as(select 1 id, to_date('01/01/2009','dd/mm/yyyy') dt from dual) / Create OR Replace Package Pkg_Test Is Procedure Prc_Call_Test; End Pkg_Test; / CREATE OR REPLACE Package Body Pkg_Test Is Procedure Prc_Test( p_id In Pls_Integer , p_dt OUT Date ) Is Begin SELECT DT INTO p_dt FROM TEST WHERE ID = p_id; If p_dt < Sysdate Then Raise_Application_Error(-20000, 'Anything'); End if; End Prc_Test; Procedure Prc_Call_Test Is v_dt Date; Begin Prc_Test(1, v_dt); Dbms_Output.put_line(v_dt); -- the return is null End Prc_Call_Test; End Pkg_Test; /
If you use NOCOPY in the parameter, then the value will be applied directly to the variable of output as it get set to so it will not be lost when the exception occurs. So, of course, to capture the exception or anything to access your dbms_output statement, but it is trivial...
SQL> ed Wrote file afiedt.buf 1 CREATE OR REPLACE Package Body Pkg_Test Is 2 Procedure Prc_Test( p_id In Pls_Integer 3 , p_dt OUT NOCOPY Date ) Is -- Note the use of NOCOPY on the parameter 4 Begin 5 SELECT DT 6 INTO p_dt 7 FROM TEST 8 WHERE ID = p_id; 9 If p_dt < Sysdate Then 10 Raise_Application_Error(-20000, 'Anything'); 11 End if; 12 End Prc_Test; 13 Procedure Prc_Call_Test 14 Is 15 v_dt Date; 16 Begin 17 BEGIN 18 Prc_Test(1, v_dt); 19 EXCEPTION 20 WHEN OTHERS THEN -- Capture the correct error here rather than OTHERS 21 dbms_output.put_line('Error occurred in prc_test'); 22 END; 23 Dbms_Output.put_line(v_dt); -- the return is null 24 End Prc_Call_Test; 25* End Pkg_Test; SQL> / Package body created. SQL> exec pkg_test.prc_call_test; Error occurred in prc_test 01/01/2009 00:00:00 PL/SQL procedure successfully completed. SQL>
-
How we use the variable checkbox?
I use Cap 8. Finally, I want to set a variable to store the user's decision to play any narration automatically, or do not play automatically narration.
A check box appears as a perfect way to let the user make this decision, so I used the box widget to display only a single checkbox. Successfully, I set the text property of checkbox and entered a unique variable name (myNarrationDefault) to store the State of the checkbox. Now how to access the variable?
I added a text field, so I could see the value of this variable. However, when I try to insert a variable, I don't see the new user variable, in the list. Then I tried to add an action to a button just to see if the variable appears in the tool; There can be no.
I'm doing something wrong?
Thank you
Pete
In fact, you will need to create so that the variable you made in the interaction interface, CP does not do it for you, project/Variables in the top Menu.
When the box is checked, the value is then assigned to the variable.
-
How to remove the variable created when using definedNamedWhereClauseParam()
Hello
My Jdev version 11.1.1.7.0.
I'm Executive where clause programatically where I need to bind two bind parameters under certain conditions. Example, I have two bind variables X, Y.
Here's the problem:
Assume that the first time I'm setting one variable X, so I define X bind variable and execute the query.
What second time I send only Y but not X. In this implementation of the scenario of VO throw an exception, given that the variable X is already created in the VO object and where clause does not have this setting.
So how to remove variables created in the original Version all in definedNamedWhereClauseParam(). I need to erase what ever the previously created variable every time I execute method.
I can make the similar functionlity using setWhereClauseParam (using literals). But I have a few technical restrictions for use.
Could you please help me how to remove the variable before vo using definedNamedWhereClauseParam.
Caused by: java.sql.SQLException: try to set a parameter name that does not intervene in the SQL: itemNumber
at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:15969)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:911)
at weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper.setObjectAtName (unknown Source)
at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:4669)
at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3687)
at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:22742)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:1298)
... more than 96
Thank you.
-Diette.
Published by: Vidya Diette on February 28, 2013 08:43Hello
You need access to the variable Manager. Order of reading in the JavaDocs:
http://docs.Oracle.com/CD/E28389_01/apirefs.1111/e10653/Oracle/JBO/ViewObject.html--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableManagerOwnerBase.html#getVariableManager%28%29--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableValueManager.html--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableManager.html#removeVariable%28java.lang.String%29
Frank
-
How to call the variables of the scene inside movieClips
How to call the variables of the scene inside movieClips
One way would be to use "MovieClip (root)" to target variables in the main timeline... MovieClip (root) .someVariable = someValue;
-
How to use the variable in the path of the source of an image in flex
Hello
I just want to know that how to use the variable in the path of the source of an image in flexHello
I just want to know that how to use the variable in the path of the source of an image in flex -
How to get the device model, for example app works on PlayBoook or BlackBerry 10?
How to get the device model, for example app works on PlayBoook or BlackBerry 10?
You can use this class: http://goo.gl/GtMLP for information on devices
something like this:
String myDeviceModel = android.os.Build.MODEL; String myDeviceBrand = android.os.Build.BRAND; String myDeviceDevice = android.os.Build.DEVICE;
-
How to pass the variable to bind page ADF view object
Would appreciate your help on this.
Set up a view with a variable binding object: param1 in where clause.
I want to pass the value of the variable to link from a page of the ADF (.jspx)
I know that one Option using executeWithParams() method binding in the ADF page.
But, I want to pass a pageFlowScope parameter (which is already set when loading the page) to the variable binding VO, and the VO should also display the results filtered on the page the first time itself.
Could someone help me understand with a code, how to achieve the same. (Is there a groovy expression to access the param pageflowscope?)
Thank you
Published by: user5381160 on August 12, 2010 20:01You should also consider dragging operation executeWithParams on your workflow and of wiring to occur before your page instead of in the definition on the page itself - so it is more clear what is happening and is the approach recommended for 11 g applications. When drag-and you - drop operation, you can use the dialog box bind the parameter to your page flow - scope variable by providing the good EL there.
There is no expression Groovy in the model layer to access the workflow variable scope page (which is in the controller layer) because this would violate the separation of concerns inherent in an MVC application.
John
-
How to optimize the performance of this code?
I have two clips on a flash project. One of them is fixed and the other can be moved with the arrow keys of the keyboard. The two clips have irregular shapes, so HitTestObject and HitTestPoint does not work very well. I have a function that detects the collision of two clips using bitmap. I wanted to update the position of the Movie clip mobile so I put the function of collision detection under the ENTER_FRAME event listener code. It works fine, but when I add many fixed film clips (about 10 clips fixed in an image), the game (.swf file) becomes slower and slows down the performance of the PC. I thought that my collision detection function has a negative effect on the performance of the PC, so I used the class on this page: https://forums.adobe.com/thread/873737
but the same thing happens.You told me how to do to speed up execution of my codes?
Here's the part of my code:
stage.addEventListener (Event.ENTER_FRAME, myOnEnterFrame);
function myOnEnterFrame(event:Event):void
{
If (doThisFn) / / doThisFn is a variable to allow or prevent the kind of mobile film clip moved with arrow keys
{
If (left & &! right) {}
Player.x = speed;
Player.rotation = player.rotation - speed;
}
If (right & &! left) {}
Player.x += speed;
Player.rotation = player.rotation + speed;
}
If (up & &! down) {}
Player.y = speed;
}
If (down & &! up) {}
Player.y += speed;
}
The clips of film sets are wall1, wall2, wall3, wall4,... and so on
the following code checks to see how many walls exist on each image and pushes them in table wallAfor (var i: int = 0; i < 1000; i ++) / / you can put up to 1000 object of wall in the table wallA
{
If (this ['wall' + i]) / / if the wall object exists, push it into the table wallA
{
wallA.push (this, ['wall' + i]);
}
}
for (i = 0; i < wallA.length; i ++)
{
If ( h.hitF (player, wallA [i]) | gameOverTest) / / this code checks whether or not the player (the mobile clip) hit the walls
{
trace ("second try");
gameOver.visible = true;
doThisFn = false;
}
}
I think the following codes are easy to turn and run. I think that the performance problem is due to previous codes.
If (player.hitTestObject (door))
{
Win.Visible = true;
doThisFn = false;
}
If (key) / / if there is a key on chassis
{
If (player.hitTestObject (key))
{
Key.Visible = false;
switch (currentFrame)
{
case 4:
wallA [0] .visible = false;
.x wallA [0] = 50000;
break;
case 5:
wall14. Play();
wall8.x = 430;
break;
}
}
}
}
}
It's a simple question that doesn't usually have a simple answer.
Here is an excerpt of a book (Flash game development: in a Social, Mobile and 3D world) I wrote.
Optimization techniques
Unfortunately, I don't know any way completely satisfactory to organize this information. In what follows, I discuss memory management first with sub-themes listed in alphabetical order. Then I discuss the management of CPU/GPU with subheadings listed in alphabetical order.
This may sound logical, but at least, there are two problems with this organization.
1. I don't think it's the most useful way to organize this information.
2. memory management affects the CPU/GPU use, so that everything in the section of memory management can also be listed in the section CPU/GPU.
In any case, I'll also list information in two other ways, from the easiest to the most difficult to implement and more for much less.
Two of these later inscriptions are subjective and dependent on experience developer and capabilities, as well as environmental test and the test situation. I very much doubt there would be a consensus on the order of these lists. However, I think that they are still valid.
Easier to the more difficult to implement
1. do not use the filters.
2. always use the reverse for loops and avoid loops and avoid while loops.
3. explicitly stop timers for their loan for gc (garbage collection).
4. use the weak event listeners and remove headphones.
5. strictly type variable when possible.
6. explicitly disable interactivity mouse when interactivity smile not necessary.
7. replace dispatchEvents with callback functions whenever possible.
8 it would be gc stop sounds for the sounds and SoundChannels.
9. use the DisplayObject most basic need.
10. always use cacheAsBitmap and cacheAsBitmapMatrix with air applications (i.e., mobile).
11. reuse of objects when possible.
12 Event.ENTER_FRAME loops: use different listeners and different listener functions applied to DisplayObjects as little as possible.
13. the pool instead of creating objects and gc objects ' ing.
14. use partial blitting.
15. use step blitting.
16 use Stage3D
Biggest advantage less
- Use the blitting Stadium (if there is enough memory system).
- Use Stage3D.
- Use partial blitting.
- Use cacheAsBitmap and cacheAsBitmapMatrix with mobile devices.
- Disable explicitly interactivity mouse when interactivity smile not necessary.
- Do not use filters.
- Use the most basic necessary DisplayObject.
- Reuse objects whenever possible.
- Event.ENTER_FRAME loops: use different listeners and different listener functions applied to DisplayObjects as little as possible.
- Use reverse for loops and avoid the do loops and while loops.
- The pool instead of creating objects and gc'ing.
- Strictly, type variable when possible.
- Use weak event listeners and remove headphones.
- Replace dispatchEvents by the callback functions whenever possible.
- Explicitly stop timers on loan for the gc.
16 stop sounds for the sounds and SoundChannels be gc would be.
-
PowerCLI Invoke-VMScript re - ip guest - how to get the variable hostname comments
I run the following script as a task Post-Power-we a re - ip our VMs after that MRS. them rocking. I was able to run this script successfully without the variable hostname of comments (in the test, he runs a script by test VM with the hostname assigned...), but I'm stumped on how to get comments variablized according to the machine's host name works on, it will take the host name and use it in the GuestUser variable and the command - VM. I tried the bold part, but it does not work.
$srv = Connect-VIServer 10.0.0.10 - administrator of the username-password password
$Hostname = (get-wmiobject win32_computersystem). Name
$script = "%windir%\system32\cmd.exe/c c:\dr\drIPsettings.bat".
$HostUser = "root".
$HostPassword = "password"
$GuestUser = ' $Hostname\Administrator '.
$GuestPassword = "password"
$ScriptType = "bat".
SE connect-VIServer 10.0.0.10 - Session $srv. SessionID
Invoke-VMScript - ScriptText $script - VM $Hostname - HostUser $HostUser - HostPassword $HostPassword - GuestUser $GuestUser - GuestPassword $GuestPassword - ScriptType $ScriptType
Thank you!
How you code the - VM on the Invoke-VMScript cmdlet parameter, it seems that Displayname of the guest is the same as the host name.
Can't you just use a loop on guests and then use the displayname property
$script = "%windir%\system32\cmd.exe /c c:\dr\drIPsettings.bat" $HostUser = "root" $HostPassword = "password" $GuestPassword = "password" $ScriptType = "bat" Get-VM | %{ $GuestUser = $_.Name + "\Administrator" Invoke-VMScript -ScriptText $script -VM $_ -HostUser $HostUser -HostPassword $HostPassword -GuestUser $GuestUser -GuestPassword $GuestPassword -ScriptType $ScriptType }
You can encode the Get - VM with more specific selection criteria or use a Where-Object after the Get - VM.
____________
Blog: LucD notes
Twitter: lucd22
-
How to pass the variable to a swf into another swf
I declared a variable in the one.fla file
I open another file swf on a button.
the code is as follows
name = 'personName ';
myButton.onRelease = function () {}
trace ("liberation" + name); personName
loadMovie ("mainPage.swf", _root);
_root.loadMovie ("mainPage.swf");
}
I want the variable 'name' of access to another swf file. IE (mainPage.swf)
How do I do that?
You want to use the MoveClipLoader class (using loadClip() and addListener methods) rather than loadMovie so that you can wait for the file to load before you try to access anything in it. You can create an empty movieclip to load the SWF in, and in this way the loaded file can be targeted using the empty movieclip instance name.
-
How to use the variable in the coil
How can I draw a sequence number of the database and use it in a sqlplus spool file name...
This forum works as: sqlplus user/pass@sid@c:\file.sql
sample file:
BEGIN
declare
V_E_NUMBER varchar2 (7);
Start
Select "E" | LPAD (RWP. E_NUMBER_seq. NEXTVAL, 6, '0') IN THE DOUBLE V_E_NUMBER;
end;
end;
Select "E" | LPAD (RWP. E_NUMBER_seq. CURRVAL, 6, '0') IN THE DOUBLE V_E_NUMBER;
trigger the echo
SET THE POSITION
SET LINESIZE 430
set verify off
SET PAGESIZE 0
SET TRIMSPOOL ON
SET OFF calendar
SET termout ON
SET feedback OFF
coil d:\securedASP\CORE. BU34500.AR.'|: V_E_NUMBER |'. RECEIVD
Select * from table;
spool offHello
Use a substitution for that variable:
COLUMN v_e_number NEW_VALUE v_e SELECT 'E' || lpad ( RWP.E_NUMBER_seq.NEXTVAL , 6 , '0' ) AS V_E_NUMBER FROM DUAL; SPOOL d:\securedASP\CORE.BU34500.AR.&v_e..RECEIVD
Note that this does not at all use PL/SQL.
The variable can be used without quoting or concatenation.
Which can lead to situations where it is ambiguous as to which is part of the name of the variable (the variable is named ve in this example), and what is literal text that happens to come right after him. To resolve these issues, use a point to mark the end of the variable name.
In your case, you want a literal period just after the variable name, use two: one marks the end of the name, and the other is taken literally.Get the SQL * most orders
COLUMN,
The VALUE of CONCAT, and
SET
For more details. -
How to include the variable in the SQLStatement instance in doGet Servlet
How can I get the variable empnum in the sqlStatement. I get an error.
String empnum = req.getParameter ("empnum"); -Works
out.println ("the empnum IS:" + empnum); -Works
String dsJndi = "jdbc/OracleCoreDST"; -Works
SqlStatement string = "select from HR_TABLE where HR_EMP_NUM = empnum." * - works if empnum is hardcoded.
Thank you much for the help in advance
KAString sqlStatement = "select * from HR_TABLE where HR_EMP_NUM=" + empnum;
This is basic Java. Suggest you go through a basic tutorial Java/JDBC/Servlet before posting to the forum.
Kind regards
~ K -
How to use the variable instead of the table name in the select statement of procedure
I have a procedure with a select statement with dynamic from clause. How can I use instead of the name of the table variable.
create or replace procedure scc_chemical_analysis
is
v_table_name varchar2 (100);
Start
declare
cursor c1 is select * from v_table_name; -This is the variable name. How can I use it in the select statement.
.
.
.
.
end;Hello
something like that.
1 declare 2 vSQLString VARCHAR2(32000); 3 pTableName varchar2(1000):='EMP'; 4 BEGIN 5 vSQLSTRING := 6 'SELECT ''x'' FROM ' || DBMS_ASSERT.sql_object_name(pTableName) || ' WHERE rownum<=1 '; 7 EXECUTE IMMEDIATE vSQLSTRING; 8* END; SQL> / PL/SQL procedure successfully completed.
-
How to get the variable 'dn' in a script
Hello
I have a problem, get the variable "dn" of the script is not a "public" variable, but I'm able to see in the log file. I bet it's in an object java somewhere - I don't know how to access it. No one knows how to get it. I have attached some of the newspaper:)
CN = 8485 [5-6] XX, dn = 8485601 = 9812 cgn, ani = null, dnis = null, clid = null, atype = FORWARD_ALL lrd = 9817, ocn = 9817,
I have a similar problem but I did not find the repo. package... Where?
Thank you
Maybe you are looking for
-
WiFi (slow connection on 802.11ac) subjects with 10.11.3
My Macbook is connected to a router TP - Link Archer C7 on 802.11ac v02 (5 GHz). Sitting next to the router speed is between 800 and 900 Mbps. First I had problems after wake her from her sleep. Speed has fallen to 7 Mbps. After toggling wifi turned
-
Satellite L500-1DT - unable to read discs
During these last days, I was unable to play all disks on my laptop but I am able to view the files on the disk. Usually they would be auto-play, but it just doesn't happen.Money is a little tight right now so I'm hoping there is a simple solution th
-
Re: Need drivers for video controller for Satellite
Please where can buy drivers for cotroller video compatibile vga?
-
Get the Code: 800 # b 0100
Update that I fixed it now thanks to all When I upgrade from windows I see an update. I have this but get this erroe code: 800 b 0100
-
I changed my admin password and he forgot what I do? I don't have a DVD for windiws 7.
My laptop came with Windows 7 installed, I changed my admin password and he forgot what I do? I do not have the Windows 7 DVD and blocks for computer laptop while I try to ask password that I do not remember.