1,257 Posted Topics

Member Avatar for lloydsbackyard

$query = "SELECT * FROM po wHERE (date = str_to_date({$searchString},'%m-%d-%Y') || date like str_to_date ({$searchstring},'%m-%d-%Y)) ";

Member Avatar for Sammys.Man
0
138
Member Avatar for bolfescu

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 ";

Member Avatar for urtrivedi
0
155
Member Avatar for SimonIoa

Simply the page that you want to show to public users, do not keep session check in such pages.

Member Avatar for SimonIoa
0
304
Member Avatar for m1m6jbr

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 "&nbsp;&nbsp;&nbsp;".$userrow['userid']; end …

Member Avatar for m1m6jbr
0
285
Member Avatar for Poonam Jadav
Member Avatar for SimonIoa

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");

Member Avatar for urtrivedi
0
149
Member Avatar for Priti_P

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>

Member Avatar for urtrivedi
0
148
Member Avatar for Bedhoel

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

Member Avatar for Taywin
0
207
Member Avatar for supermastereu
Member Avatar for Bharadwajcvrg
Member Avatar for Bharadwajcvrg
0
781
Member Avatar for gandrap

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

Member Avatar for urtrivedi
0
261
Member Avatar for garyrichard

I agree with pritaeas if (!isset($_GET[screen])) $screen = 0; else $screen=$_GET[screen];

Member Avatar for Borzoi
0
1K
Member Avatar for ashalatha

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 …

Member Avatar for ashalatha
0
3K
Member Avatar for jeke

find one of your choice http://www.databaseanswers.org/data_models/

Member Avatar for jeke
-2
288
Member Avatar for Bin_2

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

Member Avatar for urtrivedi
0
229
Member Avatar for filipgothic
Member Avatar for filipgothic
Member Avatar for urtrivedi
0
221
Member Avatar for tokick4

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 …

Member Avatar for tokick4
0
377
Member Avatar for komal.sharif.5
Member Avatar for nadiam
0
370
Member Avatar for Darla

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 …

Member Avatar for Darla
0
197
Member Avatar for LRNPHP

ever changing means what, how frequently columns sequence changed? hourly, daily, weekly , monthly ???

Member Avatar for iamthwee
0
135
Member Avatar for Kniggles

I think you do not need where condition, following should work $sql="select playername from tablejollys order by rand() limit 1";

Member Avatar for Kniggles
0
260
Member Avatar for ravi142
Member Avatar for Lethugs

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/

Member Avatar for Lethugs
0
356
Member Avatar for stokie-rich

remove line 2 from your code Mysql Connect | mysql_connect("host","username","password");

Member Avatar for stokie-rich
0
380
Member Avatar for Tinnin
Member Avatar for RainaAnja

Following query will show first even ids in desc and later it will show odd ids in asc SELECT * FROM tablename ORDER BY case when MOD(idcolumnname,2)=0 then -1 else 1 end * idcolumnname asc

Member Avatar for Alberto Bucur
0
320
Member Avatar for goutham.tandra
Member Avatar for winbala5
Member Avatar for kevwood

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 …

Member Avatar for kevwood
0
284
Member Avatar for nurul_1

What do you mean by problem? Tell us what exaclty is not working or what is happneing? How you set value in variable $saluran

Member Avatar for nurul_1
0
154
Member Avatar for RikTelner

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 …

Member Avatar for RikTelner
0
195
Member Avatar for tundewoods

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

Member Avatar for pritaeas
0
376
Member Avatar for hiiiiii@

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.

Member Avatar for hiiiiii@
0
211
Member Avatar for newbi11
Member Avatar for vanitha.A

I would suggest to keep filepath in database and upload that file in file system of server.

Member Avatar for urtrivedi
0
151
Member Avatar for azegurb

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

Member Avatar for GliderPilot
0
188
Member Avatar for nitin_4
Member Avatar for Ambrish_1

you can not put quotes around column name (I assume from and to are column names) write as where from='4' and to='1'

Member Avatar for GliderPilot
0
147
Member Avatar for sk8ergirl
Member Avatar for V3N0M

how somebody can assume what problem u are facing with just reading above 2 lines. post deatils of problem

Member Avatar for urtrivedi
0
101
Member Avatar for dinhunzvi

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

Member Avatar for urtrivedi
0
143
Member Avatar for iamthwee

You can add custome page on wordpress and you can match your page theme with the wordpress theme.

Member Avatar for urtrivedi
0
112
Member Avatar for kyle.santelices.31

But i suggest not to use javascript to veriy captcha, always check in handler php code.

Member Avatar for urtrivedi
0
230
Member Avatar for bLuEmEzzy
Member Avatar for CarterLangley

add underscore after dollor sign on light 88 wrong $POST['person_id']; right $_POST['person_id'];

Member Avatar for CarterLangley
0
303
Member Avatar for Dinesh_9

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); %>

Member Avatar for Dinesh_9
0
1K
Member Avatar for nurul_1

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 …

Member Avatar for virtualsky
0
164
Member Avatar for chocolatte.lavista_1

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

Member Avatar for chocolatte.lavista_1
0
193
Member Avatar for mike julius
Member Avatar for mike julius
0
181

The End.