view the amount of records based on a value from column PHP
I have a table (cfsCustomersImages)
that contains the columns
imagesID
image
CustomerID
imageWant
the value of the imageWant column is default "N", if the user wants and the image that they have a form, they can check to replace the value "Y".
what I show is worth the total of the values of "Y" in the column
for example
If 6 of 'Y' can be found in the columns
6 images have been selected
Does make sense?
> I'm looking for already 'alias column mysql', but it has not really helped
Really? The first result of the research shows you exactly how do. Of course, you must always have a basic understanding of SQL and PHP.
Modify your query to:
$query_rsCount = sprintf ("SELECT COUNT (*) AS rowCount FROM cfsCustomers, cfsCustomersImages WHERE cfsCustomers.custID = cfsCustomersImages.custID AND custEmail = %s AND imageWANT = 'Y'", GetSQLValueString ($colname_rsCustomer, "text") ");
then use:
Tags: Dreamweaver
Similar Questions
-
Follow-up - how can I order lines based on a value from column to HFR
As discussed in my question on queries Top, I have a column that I ordered highest to lowest on a report.
I have now, thanks to mballo, have a column of row (still hidden) as well as the column that contains the values. I have 25 rows. My use of the Rank ([M, 1:25].ifNN(-1), descending) provides values but no order.
How can I get the lines sorted by the values in a particular column, then the first line has the highest value and the rest in descending order?
JIn the property sheet of grid, there is an option "comes out" about 1/2 at the bottom of the page. Once activated it will bring up a window that allows you to apply the sorting. You can take specific lines or all the rows and then apply that based on a column. Or vice versa.
-
Filtering measure based on a value from column to RPD
Hello
I created 2 measure in RPD effectively: channel change SLA
1 success Count who is count (Response_Event_DateTime) and
2. failure Count which is count (Failure_Reason_Key)
and in the report I put filters for these measures in Edit as formula
Success: FILTER ("ALS DONE change the channel". "County of success' using ("SLA MADE the channel change"". ")" ((Right key failed"< 1))
Chess: FILTER ("ALS DONE change the channel". "County of failure" using ("ALS FACT the channel change" ".") " ((FAILURE_REASON_KEY"NOT IN (-1, 1)))
then I calculated the percentage of success /(Successes+Failures) * 100
Everything works fine, but is there a way to put these filters for the successes and failures in RPD? So that users can simply drag and drop these measures and calculate the percentage of success?
Thanks in advance
SiriYes, you can put it in SPR... Simply create 2 new columns of logic more under table "Channel change ALS MAKES"
(1) success logic column
(2) failures logic columnFor success, check the box "use logic existing columns as source", then click 3 points...
And then in the expression builder... build the formula above... IE
FILTER ("ALS DONE change the channel". "County of success' using ("SLA MADE the channel change"". ")" Key failure of reason. "<>Even for outages logic column
Make two columns in the presentation layer, and then you're done...
Thank you
Ashish -
I need a query that selects the amount of records for each day of a table.
I need a query that selects the amount of records for each day of a table.
For example, the result would be:
1 14 date
Date 2-3
etc.
Any ideas?Sort:
SELECT count ([IDCommentaire]), convert (varchar, dateAdded, 112)
OF COMMENTSgroup by convert (varchar, dateAdded, 112)
-
the sum of the column lines based on distinct values of column B
Hi all
Here is my xml
rowset <>
< ROW >
< ORDER_NO > 103-4385509 < / ORDER_NO >
< SITE_NO > 103 < / SITE_NO >
< ORDER_ID > 4385509 < / ORDER_ID >
< CUSTOMER_ID > 2676832 < / CUSTOMER_ID >
< TAX_AMOUNT >.33 < / TAX_AMOUNT >
< CREATED_DATE > 20/08/2010 < / CREATED_DATE >
< USER_CREATED > TSDAL671 < / USER_CREATED >
< Delivery_Method > CARRY OUT STORE < / Delivery_Method >
< Entered_By > TSDAL671 < / Entered_By >
< SKU_NO > 321182 < / SKU_NO >
< NAME_TEXT > MGR_OVERRIDE < / NAME_TEXT >
< > 319 ATTRIBUTE_ID < / ATTRIBUTE_ID >
Override < ATTRIBUTE_VALUE > done < / ATTRIBUTE_VALUE >
< DETAIL_SEQ_NO > 1 < / DETAIL_SEQ_NO >
< / ROW >
< ROW >
< ORDER_NO > 103-4385509 < / ORDER_NO >
< SITE_NO > 103 < / SITE_NO >
< ORDER_ID > 4385509 < / ORDER_ID >
< CUSTOMER_ID > 2676832 < / CUSTOMER_ID >
< TAX_AMOUNT >.33 < / TAX_AMOUNT >
< CREATED_DATE > 20/08/2010 < / CREATED_DATE >
< USER_CREATED > TSDAL671 < / USER_CREATED >
< Delivery_Method > CARRY OUT STORE < / Delivery_Method >
< Entered_By > TSDAL671 < / Entered_By >
< SKU_NO > 321182 < / SKU_NO >
< NAME_TEXT > OEDTL_TAX_INFO < / NAME_TEXT >
< > 314 ATTRIBUTE_ID < / ATTRIBUTE_ID >
< ATTRIBUTE_VALUE > 441130760 | 441130760 | 441130760 | 1. 1. 1. 20100820 | 2676832 | 2. SPARE PARTS | < / ATTRIBUTE_VALUE >
< DETAIL_SEQ_NO > 1 < / DETAIL_SEQ_NO >
< / ROW >
< ROW >
< ORDER_NO > 103-4385509 < / ORDER_NO >
< SITE_NO > 103 < / SITE_NO >
< ORDER_ID > 4385509 < / ORDER_ID >
< CUSTOMER_ID > 2676832 < / CUSTOMER_ID >
< TAX_AMOUNT >.18 < / TAX_AMOUNT >
< CREATED_DATE > 20/08/2010 < / CREATED_DATE >
< USER_CREATED > TSDAL671 < / USER_CREATED >
< Delivery_Method > CARRY OUT STORE < / Delivery_Method >
< Entered_By > TSDAL671 < / Entered_By >
< SKU_NO > 412679 < / SKU_NO >
< NAME_TEXT > OEDTL_TAX_INFO < / NAME_TEXT >
< > 314 ATTRIBUTE_ID < / ATTRIBUTE_ID >
< ATTRIBUTE_VALUE > 441130760 | 441130760 | 441130760 | 1. 1. 1. 20100820 | 2676832 | 2. 0035 | < / ATTRIBUTE_VALUE >
< DETAIL_SEQ_NO > 2 < / DETAIL_SEQ_NO >
< / ROW >
I have to display 3 lines but all the sum of TAX_AMOUNT grouped by ORDER_ID, I need sum for 2 records based on the distinct value of DETAIL_SEQ
so my output should be something like below
ORDER_ID | TAX_AMOUNT | DETAIL_SEQ | ATTRIBUTE_ID
-----------------------------------------------------------------------------
4385509 | 0.33 | 1. 319
4385509 | 0.33 | 1. 314
4385509 | 0.18 | 2. 314
--------------------------------------
SUM = 0.51
------------------------------------------
Note: I can't make separate in the sql attribute_id is different for the same DETAIL_SEQ_NO.
I tired to do <? sum ([xdoxslt:distinct_values (current - group () / DETAIL_SEQ_NO)] / TAX_AMOUNT)? >
It did not work.
Can someone help me please!
Thanks in advance!This syntax will not work.
A method to do so.
-
Place the missing documents in the list of records with a rank value
Hi all
I have this table:
And I need to return the same results but with the addition of records that have no rank. For new records the VALUE must always be zero (0) and the value of DATA_INI must have the same value as the order of the records immediately following. Just like that:WITH taba AS (SELECT 99 AS id, '2011-08-08' AS date_ini, 10 AS VALUE, 1 AS RANK FROM DUAL UNION ALL SELECT 99 AS id, '2011-09-08' AS date_ini, 11 AS VALUE, 2 AS RANK FROM DUAL UNION ALL SELECT 99 AS id, '2011-10-08' AS date_ini, 10 AS VALUE, 4 AS RANK FROM DUAL UNION ALL SELECT 999 AS id, '2011-08-08' AS date_ini, 10 AS VALUE, 1 AS RANK FROM DUAL UNION ALL SELECT 999 AS id, '2011-09-08' AS date_ini, 10 AS VALUE, 2 AS RANK FROM DUAL UNION ALL SELECT 999 AS id, '2011-10-08' AS date_ini, 10 AS VALUE, 3 AS RANK FROM DUAL UNION ALL SELECT 9999 AS id, '2011-08-08' AS date_ini, 10 AS VALUE, 2 AS RANK FROM DUAL UNION ALL SELECT 9999 AS id, '2011-09-08' AS date_ini, 15 AS VALUE, 3 AS RANK FROM DUAL UNION ALL SELECT 9999 AS id, '2011-10-08' AS date_ini, 10 AS VALUE, 4 AS RANK FROM DUAL) SELECT * FROM taba
I can do this using a loop procedure, but I want a filter query. ;)99 2011-08-08 10 1 99 2011-09-08 11 2 *99 2011-10-08 0 3* 99 2011-10-08 10 4 999 2011-08-08 10 1 999 2011-09-08 10 2 999 2011-10-08 10 3 *9999 2011-08-08 0 1* 9999 2011-08-08 10 2 9999 2011-09-08 15 3 9999 2011-10-08 10 4
Thanks in advance.
Filipe AlmeidaHi, Felipe,.
So, you want multiple copies of a few lines. In other words, if a value or rnk (RANK is not a column name right) is missing in a given id you want to with the next highest rnk and the same id line repeated 2 or maybe even several times. All copies will be identical, except that rnk will have the missing numbers, and the value will be 0 on all additional copies.
A way to do that is to join your table (or something very similar to it, as in the example below) to a Meter of Table , which is a table (or a result set, in this example) counts 1, 2, 3,... up to however many copies may be required.
WITH got_rows_needed AS ( SELECT id, date_ini, value, rnk , rnk - LAG (rnk, 1, 0) OVER ( PARTITION BY id ORDER BY rnk ) AS rows_needed FROM taba ) , cntr AS ( SELECT LEVEL - 1 AS n FROM ( SELECT MAX (rows_needed) AS max_rows_needed FROM got_rows_needed ) CONNECT BY LEVEL <= max_rows_needed ) SELECT r.id , r.date_ini , CASE WHEN c.n = 0 THEN r.value ELSE 0 END AS value , r.rnk - c.n AS rnk FROM got_rows_needed r JOIN cntr c ON c.n < r.rows_needed ORDER BY id , rnk ;
By elsewhere, store date information in a VARCHAR2 column, such as date_ini, is a very bad idea. Use a DATE column.
Published by: Frank Kulash, August 8, 2012 11:02
RANK is a keyword from Oracle. (It is the name of a built-in function). If you specify your own columns of RANK, it will confuse people reading the code, and it can result in compiler errors, too.
ID is also an Oracle keyword. To be sure, you can use another name, such as grp_id, instead of id.
It is best not to name your own objects with any name of fArrondi in v$ reserrved_words.keyword. -
fill a list based on a value from the drop-down list box
Well, I know a way around it but its quite long with what I know. I worked on a better solution for a day now. So maybe (or likely) someone knows better. I'm trying to fill a drop drop down based on a user selection figure in a list of check boxes. I know I could create several drop-down lists and hide away them until the user changes the value of binding. But the dropdowns would consume a lot of space in my form design in liveCycle. So is there another way or I'm stuck he made a long journey. I also need to assign values to these elements, since they change because the values are used as item numbers later that fill a text/number field later in form as a list of materials.
Tell me if I'm wrong, please (I'm new to all this)
in the box in the click event
If (this.) RawValue == 1)
{
dropDownList1.addItem ("item # 1", "value1111");
dropDownList1.addItem ("item # 2", "value2222");
}
on the other
{
dropDownList1.rawValue = "null";
}
I'm sure that null is not good and I don't know that I have to set the drop-down menu to clear items on preOpen. Or maybe not. And there is a way to add items without the addition of a new right of the line? I'm on the right track?
Hello
Rather than having the script in each of the boxes, you can have the script in the event preOpen the drop-down list that leans on the boxes.
I downloaded an example here: https://acrobat.com/#d=VwREjsMgvqXpVqPu54kSNw
Take a look at the preOpen the dropdown event.
// clear the dropdown displayed value and items this.rawValue = null; this.clearItems(); // repopulate the items based on the checkboxes if(fruit.rawValue == 1) { this.addItem("Apples", "fruit_001"); this.addItem("Pears", "fruit_002"); this.addItem("Oranges", "fruit_003"); this.addItem("Bananas", "fruit_004"); this.addItem("Grapes", "fruit_005"); } if(cars.rawValue == 1) { this.addItem("Volvo", "car_001"); this.addItem("Ford", "car_002"); this.addItem("Opel", "car_003"); this.addItem("Toyota", "car_004"); this.addItem("Nissan", "car_005"); } if(counties.rawValue == 1) { this.addItem("Co. Tipperary", "county_001"); this.addItem("Co. Cork", "county_002"); this.addItem("Co. Dublin", "county_003"); this.addItem("Co. Clare", "county_004"); this.addItem("Co. Kerry", "county_005"); }
Hope that helps,
Niall
-
I have not tried anything to solve the problem.
- Error messages
- Recent changes to your computer
- What you have already tried to solve the problem
In Windows Media Player, press Alt + T then Options, and clear the check boxAllow screen saver during playback on the Player tab.--..--"s.dali" wrote in message news: f3210d7f-0c0a-4 d 64-bb93-7fc259bf545c...> I have not tried anything to fix the problem.>> a.. Error messages> b.. Recent changes to your computer> c.. What you have already tried to solve the problem> -
Change the border color of text field based on a value from the drop-down list
I have a dropdown menu with 4 choices of priority for maintenance. With a javascript script, I need to be able to select a 'priority' in a list box and a text box border then color with an appropriate color.
'High priority' with an export value of 0
"Medium priority" with a value of exports of 1
'Low priority' of an export value of 2
"When the time allowed" with a value of exports of 3
When one of these selections has been filed, a text box becomes available in order to write the gap. My goal is as follows.
When "High priority" is selected, the border of the text box where you write the gap would blush.
When "Moderately urgent" is checked, the border around the text box where you write the gap would turn yellow.
When "Low Priority" is checked, the border of the text box where you write the gap would become green.
When "when she allows" is checked, the border around the text box where you write the gap would have turned blue.
Otherwise, the border would be white.
This form will be used ultimately on an iPad using Expert PDF under the player. I use Acrobat X to create the form.
Any help would be appreciated.
Yes, I accidentally left a hug. I can fix it so it won't be a problem if someone tries to use it. Happy that you guessed it work.
To handle resetting, you can use a script to validate drop-down list:
Script to Validate drop-down list
If (event.value = "" "") {}
getField("discrepancy_1").strokeColor = color.white;
}
-
Script to change the selection of combo based on numerical values box is entered in a text box
I implemented a form of feedback to student and I'm looking for how to refine the process for the user. Please see the image below. As you can see that the form has individual learning, each of which has three statements of "feedback". These are currently the combo boxes with predefined statements selected by the user in the menu dropdown. These statements are connected digitally to our marking scheme that is if the feedback statement uses the word "limited", it matches with a score of 20-39 on our scale of correction. If she uses the word 'excellent', he corresponded with a score of 70-100.
Limited 20 - 39
40 - 49 adequate
good 50-59
very good 60-69
excellent 70-100
Currently, the user enters the brand in the small text box size in the right corner of the relevant learning outcomes. The user must then manually select the corresponding instructions of feedback from the drop-down list box. Which is quite tedious. Here's the thing:
Most of the time statements all match the digital brand, i.e. If the student received a score of 55, then feedback statements would usually all be in the 'good' category: '.. '. good quality research... «, ».. good analysis... «, ».. good research management... ". It would be a great time saver if the statements could be scripted to react to the numbers in the text box. For example, when the user types in a notes 50-59 feedback instructions themselves define automatically to all be '... good... ". There's still a thing.
It is important that the user has the possibility to change the declarations of individual feedback if necessary. that is a mark of 58 may require two statements of feedback in the "good" and the other in the 'very good' category: '.. '. good quality research... «, ».. good analysis...', '... VERY good orientation of the research... ". The user must therefore always the option to bypass the automatic selection if necessary.
It's beyond my Basic scripting capabilities, but I wonder if anyone can break this problem? Your help would be much appreciated.
Thank you
Charlie
Hello
I create a simple sample here - https://acrobat.com/#d=FFhf7MQtKrH5iickDJBBxw
I used the blur of the text field event so that the code is triggered when you tab to or click elsewhere in the form, the code can easily be moved.
I named the fields
Text1
Dropdown1
Dropdown2
Dropdown3
and these will have to be renamed according to the names of your fields.
Hope this helps
Malcolm
-
How to get the amount of memory installed?
(It's under the Windows operating system)
I have do a comparative analysis program for the performance statistics for some complex calculations based on the hardware.
What is the best way to get the amount of RAM installed programmatically?
How do I know if the OS is 32 or 64 bit?
Thank you!
Well, it does not resemble the Memstats VI returns the memory installed. It returns a number, but I can't match the amount of memory installed on my system. The GetCurrentPlatform seems to return only the name of the OS, not whether 32-bit or 64-bit. I see nothing in the App-> target list containing this information. At least to 8.2. Did not check in 2009.
Altenbach says:
(It's under the Windows operating system)
I have do a comparative analysis program for the performance statistics for some complex calculations based on the hardware.
What is the best way to get the amount of RAM installed programmatically?
How do I know if the OS is 32 or 64 bit?
Thank you!
Define "better". Best in speed? Better compatibility on multiple versions of the Windows operating system? Best in terms of access to this information without having to delve too in all sorts of types of data Windows and DLLs?
Would you consider .NET stand for the 'best '. If so, the amount of RAM installed can be gained from easily using the Microsoft.VisualBasic.Devices.ComputerInfo class:
To determine whether your OS is 32 - bit or 64 - bit are you trying to make a distinction between a 32 bit on a 64-bit CPU vs OS a 64 bits on 64-bit OS? I know that the WMI class can be used to obtain this information, so if you try to make this distinction, you could watch the Win32_ComputerSystem and Win32_Processor classes. For example, I think that what follows is what you would see:
OS 64-bit on x64processor:
Win32_ComputerSystem.systemType = pc x 64
Win32_Processor.addresswidth = 64
Win32_Processor.architecture = 9
Win32_Processor.DataWidth = 6432 bit on x86processor OS:
Win32_ComputerSystem.systemType = x 86 pc
Win32_Processor.addresswidth = 32
Win32_Processor.architecture = 0
Win32_Processor.DataWidth = 32OS 32 bit on x64processor:
Win32_ComputerSystem.systemType = x 86 pc
Win32_Processor.addresswidth = 32
Win32_Processor.architecture = 9
Win32_Processor. DataWidth = 64I've attached an example on how to access the classes with .NET. Not pretty, but not too bad either.
-
Try to count the number of records where some columns are met
Using SQL in Toad against an Oracle table, I'm trying to count the number of records in a table where some columns are filled. For
example, I need to know the total number of records from a table where
ln_stop_cd is not null - 65000 records
ln_process_cd is <>- 25000 0 records
ln_opt_cd is not null - 7500 records
and the record_type = "A".
I know that the total individual records as described above. However, I do not know how
the SQL to show for record_type = 'A' the total count is 97500 records. Any help would be
appreciated.Hello
It seems that the problem is that the indictment may overlap; You can count the same rank 0, 1, 2 or 3 times, depending on whether 0, 1, 2 or 3 of these 3 independent conditions are met.
Try something like this:
SELECT COUNT (in_stop_cd) + COUNT (CASE WHEN in_process_cd != 0 THEN 1 END) -- this site doesn't like the other inequality operator + COUNT (in_opt_cd) AS grand_total FROM table1 WHERE dt >= TO_DATE ('01-JUN-2011', 'DD-MON-YYYY') AND dt < TO_DATE ('02-JUN-2011', 'DD-MON-YYYY') AND record_type = 'A' ;
You want to make charges without making 3 assists separated through the table. The problem is the 3 original requests had slightly different WHERE clauses.
Put these conditions in the WHERE clause and make other conditions apply only to the individual counties, either with a column instead of *, or using a CASE statement that contains the condition that applies only to the column.Also, the date is not a column name good. Do not compare the DATEs to strings. If your column is really a DATE and you want to ignore the hours, the minutes and seconds, then the best way is to compare the column with 2 other DATES, as shown above. It's more coding, but it is more efficient and more reliable.
I hope that answers your question.
If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) and also publish outcomes from these data.
You don't have to display a large amount of data. You can probably give an excellent example of this problem with only 5 or 10 rows of sample data.
Explain, using specific examples, how you get these results from these data.
Always tell what version of Oracle you are using.Published by: Frank Kulash, August 4, 2011 11:27
-
Hi all
I need to update the quantity of hand on for an item that corresponds to the work in PROGRESS. This point is issued for use in ONGOING work.
Need to change the amount of hand on and its value in its lots.
Thanks in advance
SundarHi Sundar,
your question is not entirely clear to me. You want to update the quantity if a job in work in PROGRESS or a batch in inventory?
For many in inventory, you can use the usual stock movements (e.g. inventory > Transactions > Transactions).
For ONGOING work, you can use for example of transaction "Update quantity" in the sustainable management of FORESTS: management workshop > batch Transactions > WIP batch Transactions
But we use that to increase the amount of work. To reduce the amounts of work in case of fall, you can use the scrap operation (move the Transaction).
It all depends on your Setup and if you use the feature of costs etc.
Kind regards
David. -
Change the features of the search page to view the selected record
Hello
I have a search page that shows the results of the query at the bottom in a table. The user right click and select 'change '. The user is taken to an edit page. The edit page is a view of AllEmployees object, and it shows the first record. I want the edit page to display the row of data that the user has selected on the search page. How can I do.
Thank youWhat version of jdev you use?
In the version one (or more) were a mistake where right-clicking does not trigger the selection of the line.
The next question is are you using the VO even to the (results table) and the edit form? If this isn't the case, you must configure the VO, the edit form is based on the game in row, power to the key of the selected row in the table of search results. The basic work flow is described herehttp://tompeez.wordpress.com/2011/07/31/using-diferent-vos-for-master-detail-navigation/Timo
-
It seems impossible to display files and folders together in alphabetical order. Instead I see files first and then the files that I often (not always) want
I have sometimes seen them together but have no idea how this happens.
Ferrière
Hello Ferds,
In Windows Explorer, simply type an asterisk in the search engine to return all the files and folders in the folder parent. You can click on any column heading to sort the results in this column.
Mr. Doug in New Jersey
It is a good workaround (thanks Mr Wizard) If you want to view the files in this way - but the procedure does not correct how Explorer files are sorted in the records themselves. And you will have to do it every time you viewed a folder because the search procedure would not automatically from window to window transfer and may not be assigned to do.
I hope this helps.
Good luck!
Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.
Maybe you are looking for
-
How to set the margins of the document Pages?
I just downloaded the most recent Pages application (2015, I think) and I tried to put the margins to less than an inch on my document pages using the rule, but the margins will not spend. Is there another way to do this?
-
Hi all I want to know what windows
hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
-
Complete process - Thread stack overflow problem
Hi, I analyze + content display xml using UI event thread invoke later. I have 40 records and 10 elements/record, so I guess that's updated 400 times. As the title suggests, I get message process is complete and I understand why, but I don't know how
-
Hello worldI recently moved all my images on an external hard drive for my MAC cleaned. I try now to work on my last few sessions and when I go in LR, his watch 'File not found' and the date of the catalog is no longer bright white because when I imp
-
Problem with creative cloud and El Capitan 10.11.4
Just updated to El Capitan 10.11.4 and now creative cloud will not work (pop-up box says it may be damaged or incomplete). When I try to download and reinstall, it stops just during installation. What can I do about it?