1,257 Posted Topics

Member Avatar for vani krishnan

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

Member Avatar for pritaeas
0
1K
Member Avatar for awahqn
Member Avatar for Dani

I am not sure, But do "try- catch- exception" works in php as it works in java

Member Avatar for Dani
0
264
Member Avatar for Kalaivani Nair
Member Avatar for erabxes

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)

Member Avatar for urtrivedi
0
218
Member Avatar for ankit1122
Member Avatar for mattster
0
229
Member Avatar for Lethugs

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 …

Member Avatar for kgariando
0
318
Member Avatar for engrjd91

remove line 59, its not needed and parameter is also wrong in that line

Member Avatar for pritaeas
0
186
Member Avatar for centenond

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 …

Member Avatar for centenond
0
221
Member Avatar for Keyra Lee

http://www.appelsiini.net/projects/chained/demo.html?mark=bmw&series=series-5&model=sedan&engine=30-diesel

Member Avatar for urtrivedi
0
1K
Member Avatar for malatamil

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 …

Member Avatar for Taywin
0
264
Member Avatar for ItsMe5247

SELECT * FROM `report_card_table` WHERE expirydate>=current_date() and expiry_date<=date_add( current_date(),interval 3 month)

Member Avatar for urtrivedi
0
312
Member Avatar for ilovephp798

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

Member Avatar for ilovephp798
0
1K
Member Avatar for Priti_P

http://www.w3schools.com/json/json_eval.asp http://www.w3schools.com/json/json_syntax.asp

Member Avatar for Airshow
0
237
Member Avatar for bolfescu
Re: Join

http://stackoverflow.com/questions/16995102/laravel-4-eloquent-where-with-or-and-or

Member Avatar for bolfescu
0
198
Member Avatar for ilovephp798

echo "<input type='checkbox' name='date' value ='".date('d-m-Y', $date)."'>";

Member Avatar for ilovephp798
0
214
Member Avatar for Phanindra Reddy
Member Avatar for Phanindra Reddy
0
4K
Member Avatar for berserk

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]!="")

Member Avatar for berserk
0
506
Member Avatar for joachimanderson

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?

Member Avatar for joachimanderson
0
207
Member Avatar for nadiam

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

Member Avatar for diafol
0
618
Member Avatar for Pravesh_1
Member Avatar for wikit

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 = …

Member Avatar for urtrivedi
0
141
Member Avatar for Daisy_1

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

Member Avatar for timetraveller1992
0
548
Member Avatar for nadiam

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) …

Member Avatar for nadiam
0
308
Member Avatar for spyros.lois

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;

Member Avatar for urtrivedi
0
446
Member Avatar for newbie26

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

Member Avatar for urtrivedi
0
178
Member Avatar for sofien_1

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 …

Member Avatar for urtrivedi
0
200
Member Avatar for Cbn

Try this way <textarea name="newscontent" cols="30" rows="10" id="newscontent"> <?php echo $row['newscontent']; ?> </textarea>

Member Avatar for wikit
0
506
Member Avatar for ankit1122
Member Avatar for malatamil

See this thread. http://www.daniweb.com/web-development/threads/481556/export-mysql-query-to-excel-in-php

Member Avatar for malatamil
0
237
Member Avatar for Vishnu_4

<?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

Member Avatar for urtrivedi
0
153
Member Avatar for mark.giles.14

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 …

Member Avatar for mark.giles.14
0
236
Member Avatar for Sanjeev.

Pass values in hidden form elements Post form to next page make use of $_POST array to read values on next page

Member Avatar for urtrivedi
0
149
Member Avatar for lloydsbackyard

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> …

Member Avatar for urtrivedi
0
1K
Member Avatar for riteshuae

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

Member Avatar for riteshuae
0
239
Member Avatar for Daneos

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 …

Member Avatar for DJBirdi
0
147
Member Avatar for berserk

Use following clause update when duplicate http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html

Member Avatar for berserk
0
360
Member Avatar for Juliana20
Member Avatar for rubberman
0
265
Member Avatar for Mian Sahib Jan

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 …

Member Avatar for urtrivedi
0
156
Member Avatar for Jerome_3
Member Avatar for Jerome_3
0
310
Member Avatar for newbie26

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

Member Avatar for newbie26
0
241
Member Avatar for ms061210

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

Member Avatar for urtrivedi
0
177
Member Avatar for Nikhil_4

Reasons: 1) Your html part is not having LastName , Age elements properlly spelled 2) Your input method may be GET instead of POST

Member Avatar for nadiam
0
2K
Member Avatar for hanspeare_1

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']}");

Member Avatar for hanspeare_1
0
313
Member Avatar for nadiam

I hope this may help you. You can do that using css http://www.w3schools.com/css/css_mediatypes.asp

Member Avatar for nadiam
0
3K
Member Avatar for jasmine_1234

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 …

Member Avatar for DJBirdi
0
163
Member Avatar for SimonIoa

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'

Member Avatar for SimonIoa
0
316
Member Avatar for Sammys.Man

Try to Use distinct keyword in your query $dropdownquery="select distinct col1,col2 ....";

Member Avatar for Sammys.Man
0
210
Member Avatar for Jake2025

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 …

Member Avatar for Jake2025
0
286
Member Avatar for lloydsbackyard
Re: date

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

Member Avatar for lloydsbackyard
0
126

The End.