1,257 Posted Topics
Re: [CODE] SELECT Users.id, Users.Username, User_status.id_status, sum(case when Analysis.status_name='w' then 1 else 0 end) won, sum(case when Analysis.status_name='v' then 1 else 0 end) void, sum(case when Analysis.status_name='l' then 1 else 0 end) lost FROM UsersINNER JOIN User_status ON Users.User_status_name=User_status.user_status left outer JOIN Analysis ON Users.Username=Analysis.Tipster WHERE User_status.id_status>=3 GROUP BY Users.id, Users.Username, … | |
Re: and two forieng keys to your deal table Lawyerid, organizationid and one more say deal_fees So you deal will be like dealid, lawyerid,orgniszationid, deal_fees and other columns | |
Re: Add following javascript code before html body tag. [code] <script lang='javascript'> function calculate() { //e is previous //f is current //g is new is f-e previous=parseFloat(document.getElementById("e").value); curr=parseFloat(document.getElementById("f").value); if(!isNaN(previous) && !isNaN(curr) ) { if(curr>=previous) document.getElementById("g").value=curr-previous; else document.getElementById("g").value=""; } else { document.getElementById("g").value=""; } var total = 0; for (i = 1 ;i … | |
Re: It seems that there is not problem in the query. what error or message u are getting? To actually delete the record you must pass whole title into $_GET['teachers']. | |
Re: You simple cut your line 27 [code]echo "<form action=\"cat.php\" method=\"post\">\n";[/code] and place it at line no 8 that is before executing your query. your select-option must be the part of your form to post it to next page. | |
Re: I think you have not intialized $page anywhere in the code. so line number 9 always sets $page to 1. | |
Re: detailtable (game,winnername,age) cricket,abc, 25 basketball,abc, 28 you should store in this manner. what you are asking is report. so we may retrived any kind of information from above table in any format using queires. so you should use above table to store basic info. | |
Re: [code] <html> <head></head> <body> <div id="container" > <div id="header" align="center">Header bits go here</div> <div id="content" align="center">Content bits go here <div id="footer" align="center">Footer bits go here</div> </div> </body> </html> [/code] | |
Re: copy this line in the begining of your code and check what error message it is giving. correct your query and then try again. [code] error_reporting(E_ALL); ini_set("display_errors", 1); [/code] ![]() | |
Re: at the end of query write order by profit desc | |
![]() | Re: specify your problem in detail may be with your code. ![]() |
Re: It is used to suppress errors. Even if function fails, it continues execution. But we should avoid using it, let the error shown and fix it. | |
Re: You may also use javascript datepicker library. In that case you need not to use seperate selection boxes | |
Re: I am adding something to condition in line no 23 [code] if ($result <> '' && trim($name) !='') { [/code] | |
Re: Following query will add 15 minutes to col2 and then compare new time with col1. col1 and col2 must be datetime type column. [code] select * from mytable where col_1_datetime= date_add(col_2_datetime ,interval 15 minute) [/code] | |
Re: remove , vehicles.vehicles_year from your query. | |
Re: Is there a page which is called from all pages, some configuration or connection page. You may use that page to update user table. And I suggest to insert timestamp intead of flag. | |
Re: cast your value using (int). [code] <?php $newvalue=(int)$_REQUEST['userinput']; ?> [/code] ![]() | |
Re: you are doing it in reverse order, following is the correct version [code] $sql="UPDATE $tbl_name set password='$new_password' WHERE user='$user'"; [/code] | |
Re: Please be specific about your problem. What problem you are facing? And why you have embedded html code in your query code. | |
Re: I think there is problem with the relation between the tables. If you want to join analysis table with users table then there must be some common column between them. but in analysis table there is no column related to users. So have some link between these two tables and … | |
Re: When you are opening whole file in textarea then why you are treating it as csv, simply load text area with content, modify and save. I hope following code will help you [code] <form action="save.php" method="post"> <textarea name="events" cols="100" rows="10" style="text-align:left"> <?php $handle=fopen("events.csv","r"); echo fread($handle,filesize("events.csv")); fclose($handle); ?> </textarea><br /> <input … | |
Re: You can create [URL="http://www.felipecruz.com/oracle-temporary-tables.php"]global temporary tables [/URL]in oracle and use them in your procedure. [code] Creation Of Temporary Tables The data in a temporary table is private for the session that created it and can be session-specific or transaction-specific. If the data is to deleted at the end of the … | |
Re: There is problem with your query. before executing it do following. [code] $query="SELECT q.*, IF(v.id,1,0) AS votedFROM quotes AS qLEFT JOIN quotes_votes AS v ON q.id = v.qid AND v.ip =".$ip." AND v.date_submit = '".$today."'"; echo $query; . . . $result = mysql_query($query); . . . [/code] copy the output … | |
Re: Because you are passing same value=\"".trim($_POST['EffStartDT'])."\"; You must give some other variable for first one | |
Re: [code] $response=mail(...pass proper parameters.....); if($response) echo "Mail sent successfully"; else echo "error occured while sending a Mail"; [/code] ![]() | |
Re: I am writing code for your third page. In php you must use post element name without [], to access whole array Checked item ids will be displayed by the following code [code] <?php echo "close now checked <br>"; for($i=0;$i<count($_POST['closenow'];$i++) { echo "{$_POST['closenow'][$i]}<br>"; } echo "delete checked <br>"; for($i=0;$i<count($_POST['O_delete'];$i++) { … | |
Re: there is a problem in your line no 217-218. $sel_subject['id']; is not having proper value. [code] <a href="delete_subject.php?subj= <?php $sel_subject['id']; ?>" [/code] | |
Re: I am not sure what is your problem, even though I guessed your problem and made certain changes. 1) used while{ } loop instead of do.. while loop 2) used two variable grandnaira & granddollar , intialize them and added current value in every iteration. 3) You were printing grand … | |
| |
Re: Go through the follwing code carefully. I have not used ajax here. Its simple php/javascript. I am assuming that your code,mf table is very small so i am storing its values in a javascript array, and using it for calculation. If your table is very large then u must learn … | |
Re: option 1 [code] <?php for($j=0;$j<count($number);$j++) { ?> <input type='text' size='1' name='inputno<?php echo $j;?>' id='inputno<?php echo $j;?>' onchange="check_input(this.value, '<?php echo $j;?>' );"> <?php } ?> [/code] option 2 [code] <?php for($j=0;$j<count($number);$j++) { echo "<input type='text' size='1' name='inputno{$j}' id='inputno{$j}' onchange=\"check_input(this.value, '{$j}')\">"; } ?> [/code] | |
Re: your query is absolutely fine. what error message you are getting. | |
Re: If you want to refer to same table only once than you can do it in same table. If there are more than one references then you need to create another table with one to many relation. You should always link to primary key, DO NOT USE ATTNAME. It is … | |
Re: at the end of calculate function you may add code [CODE] FUNCTION CALCULATE { . . . . document.getElementById(label1).innerHTML = cost; document.getElementById(label3).innerHTML = parseFloat(document.getElementById(label1).innerHTML) + parseFloat(document.getElementById(label2).innerHTML); } [/CODE] | |
Re: [code] <?php if($mydata>0) { ?> <tr style='display:inline'> <td> this is visible</td> </tr> <?php } else { ?> <tr style='display:none'> <td> invisible</td> </tr> <?php } ?> [/code] | |
Re: rename your table order to ORDERS, keyword may creating some problem ![]() | |
Re: comment line 11 and write the line i have given below [code] --SELECT @houseAddressID FROM HouseAddress WHERE HouseAddress.postCode = @postCode set @houseAddressID = SCOPE_IDENTITY() [/code] | |
![]() | Re: I have made few change in your code. I hope it will work as expected. page 1, line 8 [code] $i=0; while..... [/code] page 1, line 10 changed only portion of check box element, removed id=checked[] and added value attribute [code] <input name="checked[]" type="checkbox" value="'.$i++.'" /> [/code] page 2, line … ![]() |
Re: [CODE] <?php $query="select * from table order by date {$_REQUEST['qryorder']}"; . . . . . . ?> <form name=frm action='thispage.php'> <select name=qryorder onchange='document.frm.submit()'> <OPTION VALUE='asc'>Ascending <OPTION VALUE='desc'>Descending </SELECT> </form> . . . . . [/CODE] or [CODE] <?php $query="select * from table order by date {$_REQUEST['qryorder']}"; . . . . … | |
Re: You write your php script say mycron.php. Then in windows start/programs/accessories/system tools/schedule task, add one task you may give direct command like php.exe "c:\apache\htdocs\myweb\myfolder\mycron.php?mypara=1" you may set time, give userid password. now windows will take care of rest things ![]() | |
Re: [CODE] select count(*) from information_schema.tables where table_name='SEARCH_TABLE_NAME' AND TABLE_SCHEMA='SEARCH_DATABASE_NAME' [/CODE] OR If you want to create new table you may also use create or replace syntax........ | |
Re: at your line number 13, add one line as shown below [code] $_POST['Belopp']=$avrundat; [/code] | |
Re: To me it seems to be fine. You may continue using this design. You may join tables using following query [code] select a.company_id, a.company_name ,a.CEO, a.Founded, a.Website, a.Share_Price , b.year, b.earning from company a left outer join earnings b on a.company_id=b.company_id [/code] ![]() | |
Re: post your table structure and sample data, then let us know which table you want to update from which table, every week. | |
Re: 1) at line 18 add following line [code] echo $sql; [/code] copy the dynamic query from browser and run it in mysql client or phpmyadmin what ever you are using, now see the result. 2) change line no 22 as given [code] if ( mysql_result($rs,0,"empid") =$id ) [/code] | |
Re: select max(invoiceno) from bill OR You may set invoiceno column to AUTO_INCREMENT in MYSQL, it will automatically insert new id. ![]() |
The End.