1,257 Posted Topics

Member Avatar for Boskor

[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, …

Member Avatar for Boskor
0
129
Member Avatar for Jessie21

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

Member Avatar for griswolf
0
94
Member Avatar for ayesha789

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 …

Member Avatar for ayesha789
0
222
Member Avatar for maunica

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'].

Member Avatar for Manuz
0
85
Member Avatar for davidjennings

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.

Member Avatar for davidjennings
0
270
Member Avatar for AntiNL

I think you have not intialized $page anywhere in the code. so line number 9 always sets $page to 1.

Member Avatar for AntiNL
1
168
Member Avatar for kishanvkumar

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.

Member Avatar for kishanvkumar
0
182
Member Avatar for umandajayo

You just give alias name before column name p.categories_id Also check the spelling of column name

Member Avatar for Virtualbase
0
77
Member Avatar for veledrom

[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]

Member Avatar for digital29
0
282
Member Avatar for toasty525

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]

Member Avatar for rajarajan2017
0
83
Member Avatar for Boskor
Member Avatar for kirtan_thakkar
Member Avatar for slyme

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.

Member Avatar for slyme
0
98
Member Avatar for rics

You may also use javascript datepicker library. In that case you need not to use seperate selection boxes

Member Avatar for urtrivedi
0
136
Member Avatar for gymangel812

I am adding something to condition in line no 23 [code] if ($result <> '' && trim($name) !='') { [/code]

Member Avatar for urtrivedi
0
344
Member Avatar for Monster Killer

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]

Member Avatar for Monster Killer
0
104
Member Avatar for davidjennings
Member Avatar for ayesha789

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.

Member Avatar for ayesha789
1
246
Member Avatar for niths

cast your value using (int). [code] <?php $newvalue=(int)$_REQUEST['userinput']; ?> [/code]

Member Avatar for rajarajan2017
0
91
Member Avatar for bsewell

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]

Member Avatar for urtrivedi
0
80
Member Avatar for sugikrish
Member Avatar for auralaways

Please be specific about your problem. What problem you are facing? And why you have embedded html code in your query code.

Member Avatar for auralaways
0
1K
Member Avatar for Boskor

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 …

Member Avatar for Boskor
0
295
Member Avatar for bsewell

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 …

Member Avatar for bsewell
0
148
Member Avatar for dinilkarun

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 …

Member Avatar for babyDBA
0
236
Member Avatar for as005

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 …

Member Avatar for urtrivedi
0
207
Member Avatar for sinyi

Because you are passing same value=\"".trim($_POST['EffStartDT'])."\"; You must give some other variable for first one

Member Avatar for sinyi
0
164
Member Avatar for refilltuffy

[code] $response=mail(...pass proper parameters.....); if($response) echo "Mail sent successfully"; else echo "error occured while sending a Mail"; [/code]

Member Avatar for rajarajan2017
0
133
Member Avatar for GameCherry

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++) { …

Member Avatar for GameCherry
0
722
Member Avatar for samsons17

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]

Member Avatar for JRM
0
92
Member Avatar for fizanos

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 …

Member Avatar for fizanos
0
611
Member Avatar for blessan
Member Avatar for ayesha789

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 …

Member Avatar for ayesha789
0
298
Member Avatar for pentolanmenteng

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]

Member Avatar for urtrivedi
0
88
Member Avatar for charvie
Member Avatar for tyson.crouch
0
88
Member Avatar for tyson.crouch

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 …

Member Avatar for tyson.crouch
0
105
Member Avatar for jellybeannn

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]

Member Avatar for jellybeannn
0
82
Member Avatar for dandixon

[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]

Member Avatar for liamfriel
0
1K
Member Avatar for sugikrish
Member Avatar for rajarajan2017
1
245
Member Avatar for JustmeVSI

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]

Member Avatar for JustmeVSI
0
774
Member Avatar for dan_ord

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 …

Member Avatar for dan_ord
0
76
Member Avatar for freiheit

[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']}"; . . . . …

Member Avatar for urtrivedi
0
235
Member Avatar for muralibobby2015

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

Member Avatar for diafol
0
807
Member Avatar for sunny.
Member Avatar for vs.vaidyanathan

[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........

Member Avatar for vs.vaidyanathan
0
630
Member Avatar for Valkyrian

at your line number 13, add one line as shown below [code] $_POST['Belopp']=$avrundat; [/code]

Member Avatar for Valkyrian
0
2K
Member Avatar for aceriker

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]

Member Avatar for rajarajan2017
0
104
Member Avatar for paragouldgamer

post your table structure and sample data, then let us know which table you want to update from which table, every week.

Member Avatar for urtrivedi
0
108
Member Avatar for Roses89

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]

Member Avatar for Roses89
0
143
Member Avatar for sugikrish

select max(invoiceno) from bill OR You may set invoiceno column to AUTO_INCREMENT in MYSQL, it will automatically insert new id.

Member Avatar for rajarajan2017
0
106

The End.