-
Began Watching Linking multiple entries to a particular User email/Id in a database
Having a form as below, what should I do to my database or how should I structure my database so that for instance, a particular user will have all the … -
Began Watching Login error!
I have the following code to login in my php page. Whenever I enter my username & Password & hit login, I get the following error. Warning: mysql_fetch_array() expects parameter … -
Replied To a Post in Login error!
remove line 59, its not needed and parameter is also wrong in that line -
Replied To a Post in select option using onchange event in php
http://www.appelsiini.net/projects/chained/demo.html?mark=bmw&series=series-5&model=sedan&engine=30-diesel -
Replied To a Post in Why this variables $_SESSION['username'] and $username are interfering
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 … -
Began Watching Why this variables $_SESSION['username'] and $username are interfering
In local host i could create $username and $_SESSION['username'] and were two different variables, now it seems to interfere? -
Replied To a Post in Query to find out all cards expiring in 90 days
SELECT * FROM `report_card_table` WHERE expirydate <= date_add( current_date(),interval 3 month) -
Began Watching Query to find out all cards expiring in 90 days
I have a table called Report Card Table. In that table there is colum called expiry date. I would like to know everybody who's card is expring in less than … -
Replied To a Post in Query to find out all cards expiring in 90 days
SELECT * FROM `report_card_table` WHERE expirydate>=current_date() and expiry_date<=date_add( current_date(),interval 3 month) -
Replied To a Post in to display last 3 months of data
$sql8 = mysql_query("SELECT `orderlist_id`, `brandname`, `packsize`, `quantity`, `mrp`, `ourRate`, `Sum`,user_id,userName,`date` FROM `orderlist` WHERE `user_id`='$userid' AND `userName`='$usern' AND `date`>date_sub( current_date(),interval 3 month)"); No need to rename field, you can enquote field … -
Replied To a Post in to display last 3 months of data
> i want to display last 3 months of data When you say last 3 months, so by default it means last three months from current date (today). -
Began Watching to display last 3 months of data
i want to display last 3 months of data. but this query is not working. it showing empty results. please some one help me. $sql8 = mysql_query("SELECT `orderlist_id`, `brandname`, `packsize`, … -
Replied To a Post in to display last 3 months of data
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 … -
Replied To a Post in array_diff to insert all unchecked checkbox
$checked = ($_POST['date']); $unchecked = ($_POST['nondate']); //$merge = array_merge($checked,$unchecked); // no need to merge as unchechk is your master array $diff = array_diff($unchecked,$checked); -
Replied To a Post in array_diff to insert all unchecked checkbox
Try with our original code and two more lines to find error <?php error_reporting(E_ALL); ini_set("display_errors", 1); include('connect.php'); $checked = ($_POST['date']); $unchecked = ($_POST['nondate']); $diff = array_diff($unchecked,$checked); if(isset($_POST['date'])) { foreach ($_POST['date'] … -
Began Watching array_diff to insert all unchecked checkbox
is it possible to make INSERT all checkbox values into database when there is **not even one** checkbox being checked since im using **array_diff** as shown below? my problem currently … -
Replied To a Post in array_diff to insert all unchecked checkbox
You doing it correct. your unchecked array itself is master arrary So you code must work PUt two lines in begining of process page (where you write insert code) error_reporting(E_ALL); … -
Replied To a Post in array_diff to insert all unchecked checkbox
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 … -
Began Watching display checkbox value
Hi all, i would like to ask about, i have (date_from) and (date_to), and i want the range of the date show in the checkbox. Example: date from: 6/8/2014 and … -
Replied To a Post in display checkbox value
echo "<input type='checkbox' name='date' value ='".date('d-m-Y', $date)."'>"; -
Replied To a Post in array of json return string
http://www.w3schools.com/json/json_eval.asp http://www.w3schools.com/json/json_syntax.asp -
Began Watching Sending multiple Attachment files in php mail function
I have got some piece of code to send multiple attachments through mail function in php. The mail with attachment will be sent if there is only one attachment. But … -
Replied To a Post in Sending multiple Attachment files in php mail function
put follwing after line 31 and before line 32 if( $x < count($files) - 1 ) -
Replied To a Post in Join
http://stackoverflow.com/questions/16995102/laravel-4-eloquent-where-with-or-and-or -
Replied To a Post in need help getting this login form to work right
Change following Line 21 $sql="SELECT username FROM admin WHERE username='".$myusername."' AND password='".$mypassword."'"; Line 25 if($row[0]!="") -
Replied To a Post in mysql count records using datediff and where
what are sample records? what output you expect from the query ? -
Replied To a Post in Problem with Joins
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 … -
Began Watching Problem with Joins
I am building a site where members can create profiles that other members can view. I want to add a favourites feature to the profiles so a member can keep … -
Replied To a Post in Multiple selects - auto fill based on first selection
This is fulll working code, If you have library file copy above function in that file Or copy in the page you want to use directly then call it in … -
Began Watching SELECT result does not display data in full
hello. I have a table populated by name. The names are links when clicked will pop up a form for editing. each input (for editing) is populated by the equal … -
Replied To a Post in SELECT result does not display data in full
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 -
Began Watching Multiple selects - auto fill based on first selection
Hi there me again, sry for the many questions but only way to learn for me is to try (even if I cant succeed) Please feel free to ask any … -
Replied To a Post in Multiple selects - auto fill based on first selection
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 … -
Replied To a Post in get data from 3 different tables in a database
Now run combined version If still record do not appear properly, then check spellings of values in all join columns 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 … -
Began Watching get data from 3 different tables in a database
hey guys. I've always had problems when it comes to getting data from multiple tables in a database and so now I have another one. I want to get data … -
Replied To a Post in get data from 3 different tables in a database
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 … -
Replied To a Post in strange sql problem multiple group by
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; -
Replied To a Post in Conditional Join in Stored Procedure - SQL
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 … -
Replied To a Post in PHP - print PDF directly to a printer
This kind of solution is useful where php mysql application is build for internal use like in intranet enviroment. Some time operator at reception need to print receipts and bills … -
Began Watching PHP - print PDF directly to a printer
I have spent a lot of time on this question, namely, how to programatically use a PHP script to send a PDF document to the printer without launching the Adobe … -
Replied To a Post in Spooling count of data with a condition in oracle
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 … -
Began Watching Spooling count of data with a condition in oracle
Kindly note that I have the below table, I am trying to spool the count of the sum of the amtpd by grouping the duedt where it is less than … -
Replied To a Post in download data in excel sheet
Another option http://www.php.net/manual/en/function.fputcsv.php -
Began Watching Get the count of a character from the beginning of a string
Hi, I have strings like '00101', 00010, i need to find out the count of occurence of 0 from the begining of the string only.In the case of first string … -
Replied To a Post in Get the count of a character from the beginning of a string
<?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 -
Began Watching download data in excel sheet
downloadsingledata_csv.php <?php /*mysql_connect("mysql1408.opentransfer.com", "A894703_Allspa13", "Beauty_13") or die(mysql_error()); mysql_select_db("A894703_beautyspa") or die(mysql_error());*/ $id = $_GET['id']; include('db.php'); $count = 0; $sqlquery = "SELECT s.Companyname,s.ContactPerson,s.EmailId,s.Url,cp.`city_id`, rc.`RelatedCatagory`,ck.MainCatagory,st.state FROM `spa` s left join relatedcatagories rc on … -
Replied To a Post in download data in excel sheet
See this thread. http://www.daniweb.com/web-development/threads/481556/export-mysql-query-to-excel-in-php -
Began Watching how could i send email to list of email addresses inside a mysql database?
how could i send email to list of email addresses inside a mysql database?? i want to create a site helping students find home tuitions. when students fill form regarding … -
Replied To a Post in how could i send email to list of email addresses inside a mysql database?
http://phpmailer.worxware.com/?pg=exampledb -
Replied To a Post in datagrid-php
> Urtrivedi is the master of understanding noobs. He seems to understand everyone of my posts easily as well :) In my view key to get correct answer for any …
The End.