1,257 Posted Topics
Re: This link might help you [url]http://www.daniweb.com/web-development/php/threads/287110[/url] | |
Re: <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> | |
Re: Have you tried quotes around href <a href='".$r1[10]."' target=_blank>View</a> | |
Re: [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 … | |
Re: 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. | |
Re: [url]http://www.apphp.com/php-datagrid/index.php?page=downloads[/url] You may download and use free 4.2.8 version. | |
Re: 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] | |
Re: 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); ![]() | |
Re: 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] | |
Re: <td style="background-image:baloon.png" > | |
Re: what are other columns in your cms table | |
Re: 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 … | |
Re: where is student id, how will you know, that who answered what? | |
Re: 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 | |
Re: 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. | |
Re: post your table structure here (both tables) have you tried adding rows directly through phpmyadmin, same error occurs there also? | |
Re: 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. | |
Re: select * from tablename where day(starttime)=day(endtime) and month(starttime)=month(endtime) and year(starttime)=year(endtime) | |
Re: 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 … | |
Re: post your table structure, sample data and expected result from that data, do no post query. | |
Re: [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] | |
| |
Re: 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 … | |
Re: 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 … | |
Re: after generating file, set its permission to 777 (just to check whether permission issue or not). | |
Re: [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] | |
Re: 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 … | |
| |
Re: 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. | |
Re: What output you are getting | |
Re: The poll is meaning less, its asking like mother is best or father is best. | |
Re: [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] | |
Re: 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; | |
Re: add some thing (given below) to you dropdown code [code] "><select name="product" id="product" onchange='javascript:document.getElementByID("barcode").value=this.value;'> [/code] | |
Re: 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. | |
Re: [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] | |
Re: I think ajax would be better option for you. You may try xajax libraries for easy integration. | |
Re: no need to union [code] select * from dbo.T_JOBS where (STATUS = 'Failed' or ENDDATEANDTIME = NULL) [/code] | |
Re: 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. | |
Re: 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. ![]() | |
Re: 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. | |
Re: 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] | |
Re: 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; … | |
Re: 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] | |
Re: Your html code will work well but, javascript code may be blocked by mail client. So it will not work as per you expectations. | |
Re: specify exactly what problem you are facing, error message, unexpected output or some thing like that. | |
Re: [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] | |
Re: you need to learn curl. | |
Re: [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] |
The End.