1,257 Posted Topics
Re: $query = "SELECT * FROM po wHERE (date = str_to_date({$searchString},'%m-%d-%Y') || date like str_to_date ({$searchstring},'%m-%d-%Y)) "; | |
Re: I have changed your first query 1) added 2 columns in group by 2) added where clause according to your second query $sql = "select id,date,category,sum(q1) Total,sum(q2) Total2,sum(q3) Total3,sum(q4) Total4,sum(q5) Total5,sum(q6) Total6 from articles WHERE from_date >= '".mysql_real_escape_string($_REQUEST["from"])."' AND to_date <= '".mysql_real_escape_string($_REQUEST["to"])."'".$search_string.$search_city." group by category order by id, date,category "; | |
Re: Simply the page that you want to show to public users, do not keep session check in such pages. | |
Re: Your requirement is just grouping, its does not look like tree You can do this using two queries $cityquery= "select distinct city from usertable" loop -- through above records and in loop fetch users for the city echo $cityrow['city'] $userquery "select usernaem from usertable where city='{$cityrow['city']}'"; loop echo " ".$userrow['userid']; end … | |
Re: what is the error? | |
Re: I have put alias a after parenthesis. Try with alias $query=mysql_query("SELECT COUNT(*) AS total FROM (SELECT COUNT(*) FROM message_believe WHERE message_believe.uid_fk ='$uid' UNION ALL SELECT COUNT(*) FROM review_believes WHERE review_believes.uid_fk ='$uid' ) a"); | |
Re: set javascript global variable onload that warn=1; but in onsubmit set warn= 0; Then on unload, you can see variable value and put alert <script> window.onbeforeunload= function() { if (warn==1 ) return "Save your data plz"; }; </script> | |
Re: you must have column in table foto that its vidoe or image. Use if condtion based on that column value to chose your html code | |
Re: Hericles, Now I guess users thinks that moderators are OMNISCIENT | |
Re: I agree with hericles. But as temporary solution following should work SELECT a.price, b.price FROM table1 AS a INNER JOIN table2 AS b ON a.sku = b.sku ORDER BY case when a.price>=b.price then a.price else b.price end desc | |
Re: I agree with pritaeas if (!isset($_GET[screen])) $screen = 0; else $screen=$_GET[screen]; | |
Re: You may use on duplicate phrase, if your table has proper primary key or unique key combination. It wil not give any error on duplicate value insertion, rather it wil update it accoding to what you set to update $sql = "insert into table (col1,col2) values (val1,val2) on duplicate key … | |
| |
Re: select cashid, ramt, pamt, ifnull(ramt,0)-ifnull(pamt,0) balance from ( select cashid, sum(amt) as ramt, NULL AS pamt from receipt where cashid in ('17', '23') GROUP BY cashid union all select cashid, NULL AS ramt, sum(amt) as pamt from payment where cashid in ('17', '23') GROUP BY cashid ) group by cashid | |
Re: echo array_sum($points)/count($points); | |
| |
Re: I do not agree with your html layout or I am not able to understand what you trying to achieve. You are using same name coderef[] for different kind of of datatype, Usually html php array is used for same kind (datatype) of column for handling multiple values. So I … | |
Re: you need to lean html forms and php form handler http://www.w3schools.com/php/php_forms.asp | |
Re: I assume that you working on php If you want to put confirmation page in between, and on confirmation, send it to real handler page. YOu can echo output using post array <?php echo "Name: " . $_POST['name']."<br>"; echo "Address: " . $_POST['address']."<br>"; echo "contact: ". $_POST['contact']."<br>"; ?> <form name=frm … | |
Re: ever changing means what, how frequently columns sequence changed? hourly, daily, weekly , monthly ??? ![]() | |
Re: I think you do not need where condition, following should work $sql="select playername from tablejollys order by rand() limit 1"; | |
| |
Re: SELECT * FROM Table WHERE (convert(varchar,DateDeleted,1)< '2014-02-12' OR DateDeleted IS NULL) You should always use proper datatime datatype when value is date, Here you have to always convert varchar to date now refer following for sql date conversions http://sqlusa.com/bestpractices2005/sqlserverstringtodate/ | |
Re: remove line 2 from your code Mysql Connect | mysql_connect("host","username","password"); | |
Re: check your query in phpmyadmin, does it gives proper result? | |
Re: http://www.w3schools.com/js/js_timing.asp | |
Re: Your query looks fine. what is the problem you are facing | |
Re: First of all you must stop directory browsing (this is not related to your problem, its just security measure). Now I can see test2.html, test.html and default.php. Which one you are working on whose code you given above. your server also adding javascript code for analytics, which is giving error … | |
Re: What do you mean by problem? Tell us what exaclty is not working or what is happneing? How you set value in variable $saluran | |
Re: 1) If You, try to open any login page in any website. 2) You enter webaddress in address bar in your browser (its your client). Rigth now ur browser is blank. 3) when you press enter , your browser sends request to the server with page name you want to … | |
Re: $query="insert inot residents_payment (uid,rate) select uid, levy from residents "; thats all you need to do, you can do directly in phpmyadmin, if it is to be run once only. | |
Re: I think you should put two timestamp columns book_from and book_upto So that it will help you to easily query any conflict in booking very easily. | |
Re: learn basics first. try w3schools.com ![]() | |
Re: I would suggest to keep filepath in database and upload that file in file system of server. | |
Re: phpmyadmin limits record at a time. most of time 30 records at same time you wil never need to see all togehter, better u filter of ur choice and below u find pages to move back and forth | |
Re: it is mi for minutes not mm YYYY-MM-DDThh:mi:ss | |
Re: you can not put quotes around column name (I assume from and to are column names) write as where from='4' and to='1' | |
Re: http://www.w3schools.com/php/php_mysql_connect.asp | |
Re: how somebody can assume what problem u are facing with just reading above 2 lines. post deatils of problem | |
Re: Session_start function is usually called in begning of page or from any common file which is included in all page in begning. Take out it from classes | |
![]() | Re: You can add custome page on wordpress and you can match your page theme with the wordpress theme. |
Re: But i suggest not to use javascript to veriy captcha, always check in handler php code. | |
| |
Re: add underscore after dollor sign on light 88 wrong $POST['person_id']; right $_POST['person_id']; | |
Re: before exeuctiong query output the prepared query. copy it and run in database administration tool. check do you find any error there <% string query = "update pharmacy set mname='"+a2+"',desc='"+a3+"',amount='"+a4+"'where pid='"+a1+"'"; %> <%=query%> <% int k = smt.executeUpdate(query); %> | |
Re: I always compare dates in mysql query insteal of in php. I suggest you to do same. I feel handling dates is little complicated in php specially for comparision. $query = "SELECT * FROM pinjaman WHERE statusPinjaman = 'Pinjam' AND NOW() >= tarikhPulang"; I guess you do not need any … | |
Re: I guess you must be having status or approved column in your table you can add same column in your query and display it SELECT student.name, student.matric, student.session, data.title, data.day, data.month, data.year, data.hour, data.minute, data.timing, data.status | |
Re: what is structure of $tblname and what is primary key in that table |
The End.