1,257 Posted Topics

Member Avatar for rpv_sen

This link might help you [url]http://www.daniweb.com/web-development/php/threads/287110[/url]

Member Avatar for rpv_sen
0
296
Member Avatar for monta2020

<table width=500px> <tr> <td width=10%>1 </td> <td width=40%>2 </td> <td width=40%>3 </td> </tr> <tr> <td >4 </td> <td >5 </td> <td >6 </td> </tr> <tr> <td >7 </td> <td >8 </td> <td >9 </td> </tr> </table>

Member Avatar for metalix
0
137
Member Avatar for ayesha789

Have you tried quotes around href <a href='".$r1[10]."' target=_blank>View</a>

Member Avatar for ayesha789
0
181
Member Avatar for branding4you

[code] <select name = "fld_wherehear" id="fld_wherehear" > <option value = "0" >Select...</option> <option value = "1" <?php echo (($_POST["fld_wherehear"]==1)?"selected":"") ;?> >Internet</option> <option value = "2" <?php echo (($_POST["fld_wherehear"]==2)?"selected":"") ;?>>Newsletter</option> <option value = "3" <?php echo (($_POST["fld_wherehear"]==3)?"selected":"") ;?>>Friend</option> <option value = "4" <?php echo (($_POST["fld_wherehear"]==4)?"selected":"") ;?>>Magazine</option> <option value = "5" <?php …

Member Avatar for branding4you
0
353
Member Avatar for ROTC89

I think, join is mysql reseverd keyword so rename it and then try again. Also you must write only one query. Here you are writing so many insert queries for one record (I GUESS). Build single insert query.

Member Avatar for vibhaJ
0
203
Member Avatar for Joshua Kidd

[url]http://www.apphp.com/php-datagrid/index.php?page=downloads[/url] You may download and use free 4.2.8 version.

Member Avatar for Joshua Kidd
0
81
Member Avatar for anish99virgo

following query is only for MSSQL. Also to update you must have some relation between the two table. [code] UPDATE tableA SET column_in_A = b.ColumninB FROM tableB b WHERE tableA.keycolumn1 = b.keycolumn1 and tableA.keycolumn2 = b.keycolumn2 [/code]

Member Avatar for kplcjl
0
188
Member Avatar for klemme

Warning is coming because you are using $qu before initializing it. You may write follwoing statements to ignore error in page_edit_parse. error_reporting(0); ini_set("display_errors", 0);

Member Avatar for diafol
0
891
Member Avatar for mrlol

you may find thing in the sql query itself [code] $query="select assignment_id, assignment_name, members, remarks, if( instr(members,'$catch_s')>0 , 1, 0 ) as allowedit from assignment_table"; . . ..other code . . . if ( $myrow2['allowedit']=='1') echo "yes"; else echo "no"; [/code]

Member Avatar for perfectweb
0
124
Member Avatar for ndiiie
Member Avatar for mr.sam
Member Avatar for RunTimeError

I think you are missing 's' getElementsByName [URL="http://www.w3schools.com/jsref/met_doc_getelementsbyname.asp"]click here for more details[/URL] [code] <html> <head> <script type="text/javascript"> function getElements() { var x=document.getElementsByName("x"); alert(x.length); } </script> </head> <body> <input name="x" type="text" size="20" /><br /> <input name="x" type="text" size="20" /><br /> <input name="x" type="text" size="20" /><br /><br /> <input type="button" onclick="getElements()" value="How …

Member Avatar for Luckychap
0
361
Member Avatar for xxreenaxx1
Member Avatar for Akash Saikia
0
80
Member Avatar for alexia_net

I think he means location of file with file name Have you tried './abc.php' //in case reside in same folder './subfolder/abc.php' //in case reside in sub folder '../upperfolder/abc.php' //in case reside in folder which one level up

Member Avatar for tomato.pgn
0
839
Member Avatar for ayesha789

when user submit data, accept only from date, to_date, then in processing form , before inserting we can find working days using php/mysql syntax.

Member Avatar for McLaren
0
276
Member Avatar for VipinDugaya

post your table structure here (both tables) have you tried adding rows directly through phpmyadmin, same error occurs there also?

Member Avatar for debasisdas
0
365
Member Avatar for Arsench

to create it in excel, you may need some library files. I have never used that though. I used to export data in csv format, which you can easily open in excel. Also you can do it using standard file write operation. no external libraries needed.

Member Avatar for rpv_sen
0
159
Member Avatar for waqar100

select * from tablename where day(starttime)=day(endtime) and month(starttime)=month(endtime) and year(starttime)=year(endtime)

Member Avatar for buddylee17
0
106
Member Avatar for jacob21
Member Avatar for urtrivedi
0
109
Member Avatar for hyuugurt

this will give friends list of this->uid [code] SELECT username FROM users WHERE id in (SELECT fid as id FROM friends WHERE uid = {$this->id}) [/code] if you want to list name of this->uid with friends then try following [code] SELECT username FROM users WHERE id in (SELECT fid as …

Member Avatar for tcatt
0
153
Member Avatar for ayesha789

post your table structure, sample data and expected result from that data, do no post query.

Member Avatar for ayesha789
0
224
Member Avatar for ryan1987

[code]select team ,sum(points) from ( select hometeam team, sum(homepoints) points from fixtures group by hometeam union select awayteam team, sum(awaypoints) points from fixtures group by awayteam ) group by team[/code]

Member Avatar for tomato.pgn
0
128
Member Avatar for jacob21
Member Avatar for swpou
0
135
Member Avatar for paresh_thummar

Search on excutescalar function. [code] . . . . qry1 = "select count (*) from mytable where mycolumn='myvalue'"; SqlCommand cmd2 = new SqlCommand(qry1, cn); value= cmd2.ExecuteScalar(); ' now repalce your ?????? with value below . . . . . [/code] qry = "insert into General values(@Gno,@GRno,@Fname,@Mname,@Lname,@Sex,@Bdate,@Pass,@Mono,@OtherNo,@Photo,@Role,@GCID)"; SqlCommand cmd2 = new …

Member Avatar for Akash Saikia
0
1K
Member Avatar for jfunchio

open phpmyadmin->database->sql paste only TRIGGER CODE NOT DELIMITER LINES in sql textarea [code] CREATE TRIGGER grade_change AFTER UPDATE on takesFOR EACH ROW BEGINIF (OLD.grade='F' OR OLD.grade IS NULL) AND NEW.grade != 'F' AND NEW.grade IS NOT NULL THEN BEGIN SET @c=(SELECT credits FROM course WHERE course.course_id=NEW.course_id); UPDATE student SET tot_cred=tot_cred+@c …

Member Avatar for urtrivedi
0
253
Member Avatar for StWa

after generating file, set its permission to 777 (just to check whether permission issue or not).

Member Avatar for urtrivedi
0
114
Member Avatar for mmlmitchell

[code] <?php $result=mysql_query("SELECT transtech, blkidfp00,SUM(g.pop) popsum, SUM(g.hu) sumhu, SUM(g.busfirms) sumbusfirms FROM wi_allbcdata g WHERE g.fips='$countyfips' AND (g.transtech=10 OR g.transtech=30 ) GROUP BY transtech, blkidfp00"); ?> [/code]

Member Avatar for urtrivedi
0
152
Member Avatar for systray

You need to understand the sequence of execution. 1) You php preprocess formats ouput for the client browser at server. Now php stops executing 2) That preprocessed code is sent to browser as html/javascript code. Where javacript code is executed, and html is rendered. 3) if you change any javascript …

Member Avatar for happytogether
0
157
Member Avatar for JANNAT123
Member Avatar for masterjiraya

you must create another php file called index_web_page2.php [code] <?php -- here proper connection parameter are required $pic=$_file["timesheet"]["tmp_name"];$destination='\xampp\htdocs\new'.'\'.$dbname.'\images'.'\'.$_files["timesheet"]["tmp_name"];move_uploaded_file($pic,$destination); /* key code */ $query="insert into img_table(img_name) values('".$pic."')"; header("location:main_file_name.php"); ?> [/code] remove this code from your main file.

Member Avatar for urtrivedi
0
65
Member Avatar for ayesha789
Member Avatar for JamesLogan
Member Avatar for vibhaJ

[code] <?php $_POST['keywords']="aaa ccc"; for($i=0;$i<10;$i++) $_POST['keywords']=str_replace(" "," ",$_POST['keywords']); $arrkey=explode(" ",trim($_POST['keywords'])); $query="select * from product where somecol='somevalue' "; $keycount=count($arrkey); if($keycount>0 and trim($_POST['keywords'])!="") { $query.=" and ("; $operator=""; for($i=0;$i<$keycount;$i++) { $query.=$operator."(product_name like '%{$arrkey[$i]}%')"; $operator=" or "; } $query.=")"; } echo $query; ?> [/code]

Member Avatar for vibhaJ
0
101
Member Avatar for MARKAND911

following queries gives difference in days. select sysdate-to_date('03-jun-2010') from dual; or here date1,date2 are fields of date datatype. select date2-date1 from sometable;

Member Avatar for karant
0
95
Member Avatar for nelliott10

add some thing (given below) to you dropdown code [code] "><select name="product" id="product" onchange='javascript:document.getElementByID("barcode").value=this.value;'> [/code]

Member Avatar for metalix
0
101
Member Avatar for Cheryl399

What do you expect from mailto function? Do you want to send content of filled form to user? Mailto function only opens email client window with blank body.

Member Avatar for Bsingh7
0
88
Member Avatar for trashed

[code] select a.debt_id ,a.data_insertion , a.debt_date,a.amount, a.paidback,a.customer_id,a.agent_id, c.operation_id,c.data,c.amount,c.customer_id,c.debt_id,c.optype from debt a left outer join ( select debt_id,max(operation_id) as last_operation_id from history group by debt_id ) b on a.debt_id=c.dept_id left outer join history c on b.last_operation_id=c.operation_id [/code]

Member Avatar for Jayavardhan
0
461
Member Avatar for sskarth
Member Avatar for sskarth
0
233
Member Avatar for P00dle

no need to union [code] select * from dbo.T_JOBS where (STATUS = 'Failed' or ENDDATEANDTIME = NULL) [/code]

Member Avatar for P00dle
0
107
Member Avatar for faizabest

problem is line no 7, that is ur query either ur table name is wrong or column name is wrong. You try to run this query in phpmyadmin then find out the syntax error.

Member Avatar for faizabest
0
145
Member Avatar for yande

It is not error its just a warning. if this is displayed on your browser then you need to modify your php.ini find display_errors = On set it to display_errors = Off restart apache.

Member Avatar for rajarajan2017
0
72
Member Avatar for mobo57

what do you mean by not working, what exact problem you are facing? what is there in db, because i dont see any relation between your db code and final code.

Member Avatar for mobo57
0
73
Member Avatar for visweswaran28

for particular date [code] select date,sum(amount) as val from table_name where date='2010-06-16' group by date [/code] for particular date and name [code] select name,date,sum(amount) as val from table_name where date='2010-06-16' and name ='myname' group by name,date [/code]

Member Avatar for urtrivedi
0
80
Member Avatar for kurky17

I am not able to understand your requirement, though you have tried your best to explain. So I am giving one mysql syntax (found in mysql manual) that will add the sum at the end with null description. [code] SELECT year, SUM(profit) profit FROM sales GROUP BY year WITH ROLLUP; …

Member Avatar for kurky17
0
199
Member Avatar for ipradip

sample [b]select concat('A',lpad(MAX(substr('A0001',2))+1,4,'0')) new_number [/b] from table here pkcolname is your primary key of table with first is letter and rest 4 are numbers. [b]select concat('A',lpad(MAX(substr(pkcolname,2))+1,4,'0')) new_number FROM TABLENAME[/b]

Member Avatar for ipradip
0
1K
Member Avatar for muralibobby2015

Your html code will work well but, javascript code may be blocked by mail client. So it will not work as per you expectations.

Member Avatar for pritaeas
0
219
Member Avatar for kingfheartz

specify exactly what problem you are facing, error message, unexpected output or some thing like that.

Member Avatar for kingfheartz
0
100
Member Avatar for oliv1

[code] $condition=""; if(isset($_POST['bedrooms']) && isset($_POST['bathrooms']) ) $condition=" where bedrooms like '{$_POST['bedrooms']}' AND bathrooms like '{$_POST['bathrooms']}' "; elseif(!isset($_POST['bedrooms']) && isset($_POST['bathrooms']) ) $condition=" where bathrooms like '{$_POST['bathrooms']}' "; elseif(isset($_POST['bedrooms']) && !isset($_POST['bathrooms']) ) $condition=" where bedrooms like '{$_POST['bedrooms']}' "; $query= "SELECT * FROM inventory {$condition} ORDER BY model_name ASC"; [/code]

Member Avatar for oliv1
0
112
Member Avatar for ayesha789
Member Avatar for visweswaran28

[code] <?php $string="your string"; $arr=explode(",",$string) $newstr=""; $total=count($arr); for($i=0;$i<$total;$i++) { $newstr.=$arr[$i]; if($i%2==0) $newstr.="<br/>"; elseif($i<($total-1)); $newstr.=","; } echo $string; echo $newstr; ?> [/code]

Member Avatar for samaru
0
143

The End.