How to end loop when the desired value is found.
Hi I have a loop below and I want the loop at the end when the desired value is found.
<? PHP {? >}
<? PHP $allvotedid = $row_VotedUsers ["VotedID"]? >
<? PHP} while ($row_VotedUsers = mysql_fetch_assoc ($VotedUsers));? >
I want this loop to the end when $row_VotedUsers ['VotedID'] is equal to the variable URL ID. So lets say pagename.php? ID = 1, I want the loop to go until he finds an ID value which is 1. And then I want this set to $allvotedid. And if detects any value to it then I want to stop a loop.
Thanks for any help. I hope I made that clear.
cwhazzoo wrote:
Hi I have a loop below and I want the loop at the end when the desired value is found.
The following will do what you asked:
However, it is a very inefficient way to do it. If you are interested is whether the code transmitted through the URL is in the VotedID column, simply create a Recordset by using the URL parameter ID ($_GET ['ID']) as the filter. Then check the value of $totalRows_VotedUsers. If it is 1, the user has voted. If it is 0, the user has not voted.
Tags: Dreamweaver
Similar Questions
-
How will I know when the synchronization is complete?
Hello
Is someone can you please tell me how do I know when the synchronization is complete?I paired a device (smart phone Samsung) - it worked good 10 minutes, yet on my phone says sync is complete, but any of the bookmarks do not appear on my computer 'main '.
Hello.
It is possible to "Synchronize now" in the version of office when you go to tools > synchronize now
You can check the timestamp of the last synchronization status in the topic: config page one and find the last sync, and there will be a timestamp it. Firefox Sync troubleshooting and tips for more information. -
My iPhone was stolen. How can I check when the last time that I backed up my phone to my laptop without my iPhone?
Click here and either use iTunes to check or browse to the path of the backup manually.
(142338)
-
How will I know when the capsules are on?
Original title: caps Inspiron 1545?
How will I know when the capsules are on?
Hey, Vince,.
Caps lock key are you referring?
If you look above the keyboard on the right, you will see two fires instead of one.
In addition, you will type in uppercase when the key is turned on
-
How to print photos when the display screen is white? The image is missing in it.
How to print photos when the display screen is blank? It shows only a white screen empty when I select the photo and press on print.
You click on a film image in the print module? And, I guess you don't have to go to the Print module, right? Additionally, make sure that you have chosen to make a custom package. If you chose the custom package you need to drag and drop images and organize them.
-
How can I detect when the last container in my stream is full?
I have a bunch of related containers which I am flowing text through. How can I detect when the text has filled a container? There's an overflowPolicy then I guess it can be detected.
Hello
I used this:
private function IsOverset(textFlow:TextFlow):Boolean
{
var zeComposer:IFlowComposer = textFlow.flowComposer;
var iTextLen:int = textFlow.textLength;
var iNoController:int = zeComposer.findControllerIndexAtPosition (iTextLen - 1);
return (iNoController is-1);
}
HTH,
J.
-
While the loop does not stop when the two values are equal using equal to comparitor
Hello world
I have a really, really strange bug. I have a LabVIEW VI that change a chain on a power supply. I have a start and a stop voltage and use a while loop to increment the device. For example if I want to scan from 1, 2V to 2.2 V in 0.2 V incremements, the program will end when "The current tension" = "stop the tension." And it works very well!
However, when I start - 3 V and want to stop to say-0.8 (new in 0.2 V incremements) the program does not stop when "The current tension" = "stop the tension." I checked with the probe close to what should be the end of the race and - 0.8 V goes both of the entries ' equal to ' comaprison operator, but that his can't trigger a real result.
It's very strange for me. Espeically as if I'm going - 0.8 V to-2 V but decrement of-0.2 V, the program stops correctly!
I am very confused!
See you soon!
Search on: comparison of floating-point numbers
The second thread is particularly relevant. This discussion was 2009, but you can find that the same "bug" being reported to enter the end of the 1980s.
Mike...
-
How to disable Lov when the value of the attribute is NULL at the level line
Hi all
JDev 11.1.1.5.0
I have a view as a table ADF jsff page object. Value of the attribute in a row may have null values.
And I want that Lov must be disabled when the value of the attribute in the row is null or not.
So please suggest me how can I implement this.
Kind regards
Marie-ClaudeSet to the disabled for LOV attribute property
disabled="#{bindings.YourAttribute.inputValue eq null} {code}
-
Ends of the executions in a loop when the exception occurs
Hello
create or replace type staff_list in the table to the varchar2 (100);
create or replace procedure get_empno_job (staff_list staff)
is
number of v_empno;
v_job varchar2 (100);
Start
I'm in staff.first... staff. Last
loop
Select empno, v_empno work, v_job
WCP
where ename = staff (i);
dbms_output.put_line(v_empno ||) ' '|| v_job);
end loop;
exception
When no_data_found then
dbms_output.put_line (staff (i) |) 'has no data");
end;
exec get_empno_job (staff_list ('SMITH', 'ALLEN', 'JONES', 'RAGHU', 'BLAKE', 'JAMES'));
If I execute this procedure it display empno and job to SMITH, JONES, BLAKE, RAGHU is not in emp
He goes to the section of the exception and the loop stops there.
I need to view the details for BLAKE and JAMES also.
Thank you
RambeauHello
To improve your next messages, please include your code between {code} tags (start and end tag are the same and you need to remove the space). Also, check out this [http://forums.oracle.com/forums/ann.jspa?annID=719].
Kind regards
-
How do good group when the join of two tables?
Hi all
The slot using join query, I'd like to get an output will depend on the number of 'Classes' (for example: if I want the result for 15 classes, then, he must return to 16 lines from 0 to 16).
I n query below, I use the group as
."GROUP BY report_parameters.report_parameter_value "
Error that says "this is not group by expression.
If I have commented here, here he returns 320 rows instead of 16 ranks.
Could someone help me?
Thank you.SELECT 'SUM(' || 'CASE ' || 'WHEN edr_class_by_gvw_report_data.bin_id >= ' || report_range_parameters.report_parameter_min_value || ' AND edr_class_by_gvw_report_data.bin_id < ' || report_range_parameters.report_parameter_max_value || ' THEN edr_class_by_gvw_report_data.bin_value ' || 'ELSE 0 ' || 'END ' || ') "Class ' || report_parameters.report_parameter_value || '" ' FROM report_parameters JOIN report_range_parameters ON report_parameters.report_parameter_id = report_range_parameters.report_parameter_id WHERE report_range_parameters.report_parameter_id = 2316 AND report_range_parameters.report_parameter_group = 'GVW_GROUP' AND report_range_parameters.report_parameter_name = 'GVW_NAME' AND report_parameters.report_parameter_group = 'CLASS' AND report_parameters.report_parameter_name = 'CLASS' GROUP BY report_parameters.report_parameter_value ORDER BY report_range_parameters.report_parameter_min_value ASC;
Published by: user10641405 on June 11, 2009 12:23
Published by: user10641405 on June 11, 2009 12:30Hello
Let me explain what I'm trying to do.
I want to write a query that produces this output:SUM(CASE WHEN edr_class_by_gvw_report_data.gvw >= 0 AND edr_class_by_gvw_report_data.gvw < 5 THEN edr_class_by_gvw_report_data.gvw_count ELSE 0 END ) "Class 0" SUM(CASE WHEN edr_class_by_gvw_report_data.gvw >= 5 AND edr_class_by_gvw_report_data.gvw < 10 THEN edr_class_by_gvw_report_data.gvw_count ELSE 0 END ) "Class 1" SUM(CASE WHEN edr_class_by_gvw_report_data.gvw >= 10 AND edr_class_by_gvw_report_data.gvw < 15 THEN edr_class_by_gvw_report_data.gvw_count ELSE 0 END ) "Class 2" SUM(CASE WHEN edr_class_by_gvw_report_data.gvw >= 15 AND edr_class_by_gvw_report_data.gvw < 20 THEN edr_class_by_gvw_report_data.gvw_count ELSE 0 END ) "Class 3" SUM(CASE WHEN edr_class_by_gvw_report_data.gvw >= 20 AND edr_class_by_gvw_report_data.gvw < 25 THEN edr_class_by_gvw_report_data.gvw_count ELSE 0 END ) "Class 4"
using data from tables report_parameters and report_range_parameters, which are like your tables.
Right now, I don't have report_parameters and report_range_parameters tables.
I need to create and put the data in them that is like your data.
If I have the same data you have, and if I can produce the results that you want from the data, so I'll post my query, and you can use it.I do not see how to INSERT statements like this:
INSERT INTO "class_by_gvw_report_data" SELECT site_id, site_lane_id, site_direction_id, site_direction_name, bin_start_date_time, bin_end_date_time, bin_id, bin_value FROM "class_by_gvw_bin_data"
can help me. Is the table "class_by_gvw_report_data" invloved in this problem? Is this the same as report_parameters or report_range_parameters? If Yes, I need to create it, and put the data into it, so to use the above statement I need all data of "class_by_gvw_bin_data".
I need to have something that I can run, so that my paintings will have sample data which would result in the desired output.
I need the CREATE TABLE statements, but I can probably guess what they should be if I have your data. If this isn't the case, I will seek further clarification later.
I can't guess what your data, and why is it causing problems. If I just do a few data, LII is virtually no chance he's going against hepatitis has a relationship between the tables that are causing you problems of the same nature.Please post INSERT statements that I can run and produce the same type of data that is causing problems.
-
pavillion17: How do I know when the laptop was made
I was wondering if the laptop that I just bought is a current model or a THST was manufactored earlier and maybe technologically as along a life. You know say manufactored a few years but not til now so its new, but perhaps not as common, sold as an act of that year and sold now no matter how to kn where and when it has been implemented
Hello:
As far as I know, all portable HP are assembled in China.
The serial number will provide the year and week of manufacture...
For the serial number, the classic format is to have the 4th, 5th and 6th characters of reference when the product was built. The fourth character is the date of the year (Y) and the following two (WW), the week this year, it has been made.
CCSYWWZZZZ
-
How to schedule defragmentation when the next next sched defrag NEVER shows
even if I set the defragmentation schedule, it shows always NEVER at the next scheduled time. How do change you that?
Hello
You did changes to the computer before the show?
Please follow the steps below.
Method 1:
Run the tool from the link below System File Checker.
http://support.Microsoft.com/kb/929833
Method 2:
Restore the system to the date and time when the computer was working fine.
http://Windows.Microsoft.com/en-us/Windows-Vista/what-is-system-restore
-
How do I know when the garbage collector/timer icon is active
Hello
I want to listen to changes on the phone screen, I saw peter made a suggestion in another thread a couple of years ago which resulted in using locateDfference, however, it signals a potential hole in his suggestion where, in the case where the display of the icon of the timer - the screen is constantly evolving but doesn't not really relevant to the screen are underway only the flag icon and network timer trigger changes.
I'm now trying to fill the holes, my code detects the difference of bitmaps of the screenshots, the code works, but when the garbage collertor is active it triggers a change detected in my code.
I think the easiest option is to ask the api is the garbage collector active - I printed visible applications and the garbage collector is never one of them, but I do not see that the processid is changing all the time and then maybe one of these processid I see in the console is the collecvtor of garbage and I can detect when it is active - does anyone know if I can find the processid of the garbage collector, or listen to it comes to about (the timer icon display)?
If this is not possible then maybe if I can get a proper report to the timer by screen size then I can work around the icon.
Any suggestions how to overcome my problems are welcome.
Thank you.
It's a shame... Like Simon, I'm n0t aware of a way to detect that the gc is running or display the icon, sorry.
-
How do I know when the call is received by the receiver
How to know the time of the receipt of the appeal by the appellant to the appellant.
for example. say 'A' called 'B'... then how 'A' will know the time if the 'B' has received the call
is there any way to get the time of the receipt of the appeal.
more details please. Is that what your application installed on A or b.
Looking for the time that the device has started ringing or when the beneficiary has answered the phone.
Let us know what you're trying to do, we can help you more.
Also look at the PhoneListener interface.
-
How to trigger DA when the user clicks a button close the standard window
Hello!
Apex 5.0 & universal theme.
I want to trigger some DA when the user clicks on the button indicated to my image (button close the standard window). In fact, I would like to pass a value of my hidden form IR back and refresh IR if value = 1 or don't refresh with another value.
Is this possible?
Thank you.
Hi Yava,
Seems that you have chosen to add the event handler to the page parent (the one with the IR). I think it's best. This means that the code above does not apply.
The dialogclose event and all other dialogue jQuery UI events are triggered in the dialog box to create a DA pull on the IR will not work (because the dialog box is outside the IRR while she bubbles it won't go through the SORTING). You must handle the event on the body. This works because the event propagates to the body. Set the Type to choose to be "jQuery Selector". JQuery Selector enter 'body' (without the quotes). The event you want to handle is a custom, event which means that this isn't one of those in the select list. For event, choose "Custom". Then enter Custom Event "dialogclose" (without the quotes). Now you have a DA who fires when * all * dialog closes. You may or may not need to get more selective than that. For action, you can use refresh as you do already.
Kind regards
-John
Maybe you are looking for
-
Each site has no javascript code
Some websites that I don't have javascript or they (sorry for my English) are messy. Images or videos don't is not loading. He started not so long ago, and I use 17.0.1.
-
HP Pavilion x 360 n011dx 11: x 360 11 touch screen no longer works
Hello, I bought a computer hp laptop pavilion x 360 11 n011dx, formatted and installed windows 8.1 64 pro (in Portuguese Brazil) everything has worked perfectly just the touch screen if it is stopped. I tried to format and install windows 8 enterpris
-
Problem installing Windows XP Recovery on Satellite 5105-S702
Don't know if it is the correct newsgroup for this problem. Tried to reinstall Win XP Pro on my PC Toshiba 5105-S702 using the recovery CD (circa 2001) that were provided with it, but was blocked at the beginning of the recovery process, with a messa
-
Acquisition of data IN problem
(7) how changing a DAQ board among a range of 0-10 volts to a 09:50 Volt range, influence the change in minimum voltage that can be detected? The change in minimum voltage that can be detected will be double. B change of minimum voltage that can be d
-
Is my computer screen went BLACK after downloading the window & home premium 32-bit digitalriver.Please help, thanks.