1,257 Posted Topics
Re: Such things happens in self submitting page. I used cookies to solve this kind of problem. for example when user clicks save before submitting set one cookie say "saveinfo" to 1 , using javascript, Now along with isset using php $_COOKIE['saveinfo'] ==1, in the end of page using javascript again … | |
Re: In case of oracle/mysql you can do following and even in mssql select MatchId , sum(case when SelectionName='Home win' then Odds else 0 end )home_win , sum(case when SelectionName='Draw' then Odds else 0 end ) draw , sum(case when SelectionName='Away win' then Odds else 0 end )away_win , sum(case when … | |
Re: You can use vlookup function for the same purpose http://www.techonthenet.com/excel/formulas/vlookup.php | |
Re: I have changed some lines in your searchform.html.php 1) I created javascript searchorprint function 2) I named form as frm 3) I changed type from "submit" to "button" 4) on click on button I called function searchorprint <?php include '../templete/header.php'; ?> <script language="javascript" type="text/javascript"> function searchorprint(type){ if(type=='s') { document.frm.action='view.html.php'; document.frm.submit(); … | |
Re: in begining of index.php, you may add this 2 line and run your page, you may able to see any error if it is there. error_reporting(E_ALL); ini_set("display_errors", 1); | |
Re: http://www.w3schools.com/php/php_db_odbc.asp | |
Re: out of all this code (in your first post here), also post code which you use to call all that functions, and which pariticular function gives you date in default format. | |
Re: <?php $pass="80"; //this you can pass from html form to the query $query="select sum(case when percentagescore>='$pass' then 1 else 0 end ) / count(*)*100 pass_percent, sum(case when percentagescore<'$pass' then 1 else 0 end ) / count(*)*100 fail_percent from tablename"; ?> | |
Re: $sql = "SELECT 'nom' FROM test WHERE coord='$coord'"; $req = mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error()); $row=mysql_fetch_assoc($req); echo $row['nom']; | |
Re: I used 2 tables for solving this problem in past. Table pair gives unlimited categories or not categories at all. This is same as directory structure in your computer. 1) product_master (prod_id, prod_name, is_group, other_columns) 2) product_level (child_prod_id, parent_prod_id, level_no) product_master prod_id, prod_name, is_group, other_columns 0, Items, Y, XYZ (This … | |
Re: <iframe width="450" height="350" src="http://www.youtube.com/embed/sqzSlbZ4BCE" frameborder="0" allowfullscreen></iframe> | |
Re: First time you set CURLOPT_COOKIEJAR, for rest of all calls, use same name with option CURLOPT_COOKIEFILE. <?php $cookie=tempnam("/tmp","CURLCOOKIE"); $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7"; ; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $login); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, … | |
Re: phpmyadmin version has nothing to do with mysql command syntax, mysql version is important. What sql you writing and what error are u getting. | |
Re: Use like keyword instead of equal to "select * from maintable where key like '%" & TextBox3.Text & "%'" | |
Re: I assume that ur string have only one colon, and next to colon is the text u need to find $fullstr=" 5 gallon qty: 10"; $strarr=explode(":",$fullstr) echo "qty=".trim($strarr(1)); | |
Re: what is your datatype of startime, endtime, i guess it of type date and not varchar if its date type, then you need not to use to_date simply starttime>'14-feb-2012 01:00:00 am' will work | |
Re: try to join with userid insteaad username on CustomerCode = *aspnet_Users.UserId* select aspnet_Membership.UserId,IsLockedOut,UserName,tableCustomer.CustomerName,tableCustomer.CustomerContactName from dbo.aspnet_Membership left join dbo.aspnet_Users on aspnet_Users.UserId = aspnet_Membership.UserId left join dbo.tableCustomer on CustomerCode = aspnet_Users.UserId where IsLockedOut = 1 | |
Re: abzy, you saying so many times in your post that you dont understand basket ball, before designing ERD you need to learn all things (rules,scoring method,people involved) about basketball, otherwise your ERD will surely go wrong, if you build it on scattered tips received here. | |
Re: We need to look at your code to find the problem. Only statement can not help. | |
Re: function checkEmail($email) { if (!preg_match("/^([a-zA-Z0-9\._-])+([a-zA-Z0-9\._-] )*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/" , $email)) { return false; } return true; } $dbemail="abc.com"; if(checkEmail($dbemail)) { echo "ok"; } else { echo "invalid email"; } | |
Re: In my view, if possible status list is not going to change ever, then you can use enum type | |
Re: I think its simple 2D array $arr[0]['name']=Bob; $arr[0]['last']=Jones; $arr[0]['age']=36; $arr[1]['name']=James; $arr[1]['last']=Brown; $arr[1]['age']=29; $arr[2]['name']=Lloyd; $arr[2]['last']=Mals; $arr[2]['age']=45; echo $arr[1]['name']; ![]() | |
Re: I changed you line number 8 in your code and I added last line in ur orderconfirm function $cart = $_SESSION['cart']; $items = explode(',',$cart); $result = count($items); $total_list=''; for ($i=0; $i<$result; $i++) { //echo $items[$i]; $total_list=$total_list."<br>".orderconfirm($items[$i]); //URTRIVEDI MODIFIED THIS LINE } function orderconfirm($productid) { $cus_id = $_SESSION['own_email']; $pro_id = $productid; … | |
Re: post complete code, $row is not used anywhere in your code, so better you write php code where needed, dont include all static html code in php echo. | |
Re: In my view deleting record can not be done buy pure html. If you embed php code in javascript, that code will execute at the time of page loading and not when buttton is clicked. simple javascript can not tell server to delete record (unless you use ajax). And for … | |
Re: You can use cookies http://www.w3schools.com/js/js_cookies.asp | |
Re: sample data models http://www.databaseanswers.org/data_models/index.htm class scheduling http://www.databaseanswers.org/data_models/student_class_scheduling/index.htm | |
Re: I have lines changed 5 to 15 in above code, you can not write if in string formation. remove all your 5 - 15 lines and only add following line. $q = mysql_query("INSERT INTO kontakte (emri, mbiemri,e-mail,nr,adresa,shenime) VALUES('{$_POST['emri']}','{$_POST['mbiemri']}','{$_POST['email']}','{$_POST['nr']}','{$_POST['adresa']}','{$_POST['shenime']}')"); | |
Re: $result = mysql_query(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `recover_password` = '$recover_password'"); $row = mysql_fetch_array($result)); if($row[0]==1) $flag=true; else $flag=false; | |
Re: You way is not proper to achieve your aim. Use any of the following 2 ways Way 1 <?php $bd=array('1'=>'420','2'=>'520'); echo $bd[1]."<br>"; echo $bd[2]; ?> Way 2 <?php $bd[1]=420; $bd[2]=520; echo $bd[1]."<br>"; echo $bd[2]; ?> | |
Re: Try with double quotes, use statement given below, Php string is in double quote and html element values are in single quote echo("<embed src='flash/" . rand(1, 5) . ".swf' type='application/x-shockwave-flash' width='320' height='240'></embed>"); | |
Re: are u working on ur computer or script is somewhere on live server? You need to check spellings of all js file u include, are they in /javascripts folder or not | |
Re: <a href='http://yoursite/yourpdffolder/pdffile1.pdf'>My first pdf</a> <a href='http://yoursite/yourpdffolder/pdffile2.pdf'>My second pdf</a> If clients browser has appropriate pdf reader, it will open it on click in same window, otherwise ask user to save it. you can generate above code dynaimcally using dir php function | |
Re: I use md5 in both mysql and php for oracle following link may help http://www.oracle-base.com/articles/9i/storing-passwords-in-the-database-9i.php ![]() | |
Re: can you put sample data from table a and b | |
Re: select * from table where DESCRIPTION LIKE "%searchterm1%" or DESCRIPTION LIKE "%searchterm2%" or DESCRIPTION LIKE "%searchterm3%" or DESCRIPTION LIKE "%searchterm4%" | |
Re: try storing collation as utf8_general_ci for the varchar/text column, then normal update insert will save it in unicode | |
Re: Lastmitch I think above query will work on mysql Nagarjun you can use MERGE query to update table from another table in oracle merge destination_table d using source_table s on (d.key1=s.key1 and d.key2=s.key2) when matched then update set d.colx=s.coly ![]() | |
Re: I think on your server created date is 000000. | |
Re: Here is the code <html> <script lang='javascript'> function fraclength(num) { alert(num.split(".")[1].length) ; } fraclength("54.93934"); </script> </html> | |
Re: the souce is wat responsible of what u see on browser, you can not hide it from user, dont waste time in that make server side script stronger and secure | |
Re: add semicolon to end of all statments for eg in line 4, 5 or post full code | |
Re: if you press browser refresh button it is not possible to retain values. | |
Re: select 'FHMS' + max(SUBSTRING ( employeeId ,5 , 5 ))+1 as nextkey from employeemaster I hope This is the query you are looking for | |
Re: AND must follow boOlean result. you are giving subquery to AND tell us : table strutrute sample data sample expected output | |
Re: where bid value is stored, what is ur table structure | |
![]() |
The End.