[Solved] PHP web app is unsecure while I already used pashword hash for password protection [closed]

Are you talking about the Secure Socket Layer (SSL)? Make sure all your links are https://directory/folder/file.ext and not http://directory/folder/file.ext If you want the links to work with both a secure and non-secure web site, you can start your links with just the slashes and no protocol name and colon. //directory/folder/file.ext Edit: OPs problem had to … Read more

[Solved] Proper use of NULL in mysql query from php

NULL is a specific value, not a string literal. It should be passed to query directly, i.e. INSERT INTO `Schedule` (`ETA`,`STA`,`ATA`) VALUES (‘2013-08-28 12:30:00’, NULL, NULL); that means your PHP code should handle that and not enclose NULL-s: $timeFormatAndNull = function ($format) { return function($time) use ($format) { $time = strtotime($time); return $time ? strftime($format, … Read more

[Solved] syntax error, unexpected ‘:’

Try to not use goto, as much as you can. By using goto you will be lost in your own code, because you have to search each time where your goto is pointing. Here you can do what you want by writing : if (mysql_num_rows(mysql_query(“SELECT `id` FROM `players` WHERE `hash`=’$hash’ LIMIT 1”))!=0) { $hash=generateHash(32); } … Read more

[Solved] How to fetch database values between two dates [closed]

Here it is Method body public void callDatabase(String date1, String date2){ PreparedStatement stmt=con.prepareStatement(“select absentdt, period from stu_attendancemaster where classid=70 AND absentdt BETWEEN ‘”+date1+”‘ AND ‘”+date2+”‘ “); ResultSet rs=stmt.executeQuery(); while(rs.next()) { //get data here } } Method call String d1,d2; //initialize callDatabase(d1,d2); 3 solved How to fetch database values between two dates [closed]

[Solved] How minimize this mysql query [closed]

Ever heard of JOINing tables? SELECT photo.id FROM product_photo INNER JOIN product_photo AS photo ON photo.product_id = product_photo.product_id AND photo.order >= product_photo.order WHERE product_photo.id = ’33’; The FROM and WHERE parts will select your product id = 33 and then you join product_photo with different alias (yes, you can join the same table multiple times … Read more