1,257 Posted Topics
Re: add following line before line number 90, echo $regex."<br>".$content."<br>".$match; $userID = $match[1]; site5 might have changed the source code you were matching in your code | |
Re: Put that in begining of your code set_time_limit(2000); | |
Re: I am not sure, But do "try- catch- exception" works in php as it works in java | |
Re: Explain your case with more details. What you have and what you want to do. | |
Re: Your case can be solved by using composite key (2 or more column together makes primary key of table) You can make (email_id, subject, year) as primary key If You already having single column primary key "id_no", so in that case make unique key of (email_id, subject, year) | |
Re: Embeding is something empower html http://www.w3schools.com/php/default.asp | |
Re: This is going to be complicated for you. Whenever you store time, You should store it as date time. That will help to analyse things in better manner. You should have keep only single datetime column instead of 2 separate columns Right now if you run max min fuction on … | |
Re: remove line 59, its not needed and parameter is also wrong in that line | |
Re: 1) both are different 2) one is $username is local page variable and $_SESSION['username'] is a session variable and its an array too. 3) even $UserName, $userName, $_SESSION['uSERnAME'], $_SESSION['UserName'] all are different as php is case sensitive 4) any $_SESSION variable is available globally across all pages if you start … | |
Re: http://www.appelsiini.net/projects/chained/demo.html?mark=bmw&series=series-5&model=sedan&engine=30-diesel | |
Re: You try following query, Your query may be not giving result because you are using equal to sign, so it is searching exact records for that particular single date. Following query will give all result that happened in last 3 months. Remove > sign if you want to equate only … | |
Re: SELECT * FROM `report_card_table` WHERE expirydate>=current_date() and expiry_date<=date_add( current_date(),interval 3 month) | |
Re: As when you do not check check box, it is not posted. So you must set master array while processing and find diff of master array and checked array. $master = array(1,2,3,4,5,6,7,8,9,10,11); $diff = array_diff($master,$checked); | |
Re: http://www.w3schools.com/json/json_eval.asp http://www.w3schools.com/json/json_syntax.asp | |
Re: echo "<input type='checkbox' name='date' value ='".date('d-m-Y', $date)."'>"; | |
Re: put follwing after line 31 and before line 32 if( $x < count($files) - 1 ) | |
Re: your method is post (see line no. 3) so changed line number 49,50 $myusername=mysqli_real_escape_string($con,$_POST['name']); $mypassword=mysqli_real_escape_string($con,$_POST['password']); change line 62 (if $row[0] has some value of id, means not blank) if($row[0]!="") | |
Re: 1) what are table strutures of both tables? 2) You want to search fav of one particualar user or all users? 3) What query output you expect for your above sample records? | |
Re: run this query in phpymyadmin for whom you are clicking on name link and see how dob column appears in phpmyadmin result SELECT * FROM contact1 WHERE contact_id = yournumber ![]() | |
Re: what are sample records? what output you expect from the query ? | |
Re: I have my own library function to fill combo box function fillcombo($dblink,$cmbname,$width,$query,$keycolname,$desccolname,$defaultvalue="",$initialtext="",$othertags="") { $elementstring=""; $elementstring ="\n<SELECT id={$cmbname} style='WIDTH: {$width}px' size=1 name={$cmbname} {$othertags}>"; if (trim($initialtext)!="") { $elementstring .= "\n<OPTION value=''"; if (trim($defaultvalue)=="") $elementstring .= " selected"; $elementstring .=">---{$initialtext}---</OPTION>"; } $results = mysqli_query($dblink,$query)or die("Query Failed..<hr>" . mysqli_error()); if ($results) { while($row = … | |
Re: I assume you mean code reusability. If so, you need to learn to develop class and use them as and when required in muliple pages | |
Re: Try with left outer join, and check whats missing SELECT c.contact_id,c.fullname, s.spouse_id,s.s_fullname,s.sspouse_name, ch.child_id,ch.c_fullname,ch.primaryparent,ch.secondaryparent FROM contact1 c left outer JOIN spouse1 s ON c.fullname = s.sspouse_name LEFT JOIN child1 ch ON c.fullname = ch.primaryparent Or check with trim SELECT c.contact_id,c.fullname, s.spouse_id,s.s_fullname,s.sspouse_name, ch.child_id,ch.c_fullname,ch.primaryparent,ch.secondaryparent FROM contact1 c INNER JOIN spouse1 s ON trim(c.fullname) … | |
Re: SELECT events.sensor_id, events.event_type, events.value from events inner join (select sensor_id, event_type, max(time) maxtime from tap.events group by sensor_id, event_time) t on t.sensor_id=events.sensor_id and t.event_type=events.event_type and t.maxtime=events.time ORDER BY events.sensor_id,events.event_type; | |
Re: I am not sure, but can you give try to this select * from MasterList inner join tblPositionLists on tblPositionLists.Position = case when @pRemarks='ALL' then MasterList.Position else tblPositionLists.Position end and tblPositionLists.PositionLevel = case when @pRemarks='LEVEL' then MasterList.PositionLevel else tblPositionLists.PositionLevel end | |
Re: 1) your last 2 records transaction date is not in december so it is not in result 2) You can use having clause to check aggregate value instead of querying again Two sample queries: select duedt, count(*) cnt , sum(amtpd) from ln02rep2 WHERE trndt BETWEEN '01-dec-2013' AND '31-dec-2013' AND duedt … | |
Re: Try this way <textarea name="newscontent" cols="30" rows="10" id="newscontent"> <?php echo $row['newscontent']; ?> </textarea> | |
Re: http://phpmailer.worxware.com/?pg=exampledb | |
Re: See this thread. http://www.daniweb.com/web-development/threads/481556/export-mysql-query-to-excel-in-php | |
Re: <?php $text1 = '00101'; echo "<br>$text1 -> Count 0 from begining (zeroth character) : ".substr_count($text1, '0'); echo "<br>$text1 -> Count 0 start after zeroth character : ".substr_count($text1, '0',1); ?> http://www.php.net/manual/en/function.substr-count.php | |
Re: I dont think when you add records then you need to create separate code for new records. > League_id is from another table wich is likely to be added to over time I would have to cintinually update the page adding extra code and queries every time. Is there a … | |
Re: Pass values in hidden form elements Post form to next page make use of $_POST array to read values on next page | |
Re: One way is to keep 2 separate files one part line number 1-16 1) export.html <html> <head><title>Exports</title> <link rel="stylesheet" href="css/css.css" /> <h2>EXPORT DATE/YEAR</h2></head> <form action="export.php" method="post" target='_blank'> <table> <tr> <td><input size="40" name="searchString" type="text"class="ed" /> <select name="by" class="ed"> <option>Date</option> <option>Year</option> </select> <input type="submit" name="export" value="Export" id="button2" /></td> </tr> </table> </form> </html> … | |
Re: I am writing sample query select a.id_customer, b.firstname,b.lastname, count(*) total_orders from orders a inner join customer b on a.id_customer=b.id_customer group by a.id_customer b.firstname,b.lastname | |
Re: I suggest to create one master table say, total slots slot_master slot_id 1 2 3 4 5 6 7 8 9 another table is the one you are using allocated_slot alloc_slot_id 1 2 3 5 Now you can easily join both table to find free slots select slot_id from slot_master … | |
Re: Use following clause update when duplicate http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html | |
Re: You need to put whole code here so that we can find problem | |
Re: write your common function in one .js file say you have written your javascript code in project a like /webroot/projecta/js/myfuction.js Now you want to access that same file in another projectb which is I assume that it is stored at same level. So you can include your main javascript file … | |
Re: Where is your code, and what error you get while running your script? | |
Re: I assume your database is mysql select str_to_date(string_date_col, '%M %d, %Y') from tblTransaction Str_to_date function will change string to date type http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_str-to-date | |
Re: You can also try directly using pure mysql query without php $result = mysqli_query($connection, "SELECT os_no, total, balance, discount, date_order, date_pickup, time_pickup FROM order_customer WHERE DATE( date_pickup ) BETWEEN DATE_SUB( current_date, INTERVAL 7 DAY ) AND current_date"); | |
Re: Reasons: 1) Your html part is not having LastName , Age elements properlly spelled 2) Your input method may be GET instead of POST | |
Re: I am changing 4 lines of your student_login_handler.php Line 7 $query = "select student_id,last_login_date from student_information where learner_id='$learner_id' and student_password='$student_password'"; Line 16 $_SESSION['user_id'] = $date['student_id']; Line 19 mysql_query("UPDATE student_information SET last_login_date=now() where student_id='{$_SESSION['user_id']}'",$link_id); Line 23 header("location: Student_Home.php?id={$_SESSION['user_id']}"); | |
Re: I hope this may help you. You can do that using css http://www.w3schools.com/css/css_mediatypes.asp | |
Re: I guess, You have to do on your own. If you are not developer then you may post this question in business exchange forum. You will find so many who can do it for you. I am not sure following will help you or not, but here are some paid … | |
Re: To get correct result 1) I think you need to join clause to join users U, friends F 2) need to put where f.friend_two <> '$uid' and F.friend_one <> '$uid' | |
Re: Try to Use distinct keyword in your query $dropdownquery="select distinct col1,col2 ...."; | |
Re: I guess sublime text is just an editor with good features for progammers. But any simple notepad is enough to write php code. create text file name it as HelloWorld.php (or any name with extension as php) open it and write following code <?php echo "this is php code"; echo … | |
Re: We use explode fuction with seperator / , so it will give you array of size 3, then you can concate it as shown below $datearr=explode("/",$myDate); $dbdate=$datearr[2]."-".$datearr[0]."-".$datearr[1]; |
The End.