urtrivedi 276 Nearly a Posting Virtuoso
  1. What you are showing seems to be file upload part.
  2. File content function not visible in your script. i.e. move_uploaded_file() to be moved to your folder.
  3. Href link to download file can be rendered in html emebded with php loop of file table.

echo "<a href='http:domain/contentfolder/{$filename}' target='_blank'>download file here<a>";

urtrivedi 276 Nearly a Posting Virtuoso

1 use bootstrap css or any other you know for row hover
https://www.w3schools.com/bootstrap/bootstrap_tables.asp

2 put your table under < form > tag
Add one more th/td in header and whole loop.
..
.
.
<th width="5">select row</th>
<th width="5">ID</th>
.
.
While..
..
.
.
echo '<td><input type=radio name =selrow value='.$row['id'].' ></td>'.echo '<td>'.$row['id'].'</td>'
...
.
.

Greg_11 commented: Thank-You very much, got me on the right track and I now have a working selectable table/form +0
urtrivedi 276 Nearly a Posting Virtuoso

You may try following

UPDATE download
LEFT JOIN lookup ON download.ip_address between lookup.start_ip AND lookup.end_ip
SET dowload.ref = lookup.id ;

urtrivedi 276 Nearly a Posting Virtuoso

Dear larry
You need not to have two triggers. Only before insert trigger is fine.

urtrivedi 276 Nearly a Posting Virtuoso

You can use group_concat funtion

SELECT 
    col1_id,
    col1_name,

    GROUP_CONCAT(DISTINCT col2
        ORDER BY col2
        SEPARATOR ';')
FROM
    table

GROUP BY col1_id, col1_name

http://www.mysqltutorial.org/mysql-group_concat/

SimonIoa commented: I am gettind (A,john) but only one result for col2 (bear) +4
urtrivedi 276 Nearly a Posting Virtuoso

run this query in backend phpmyadmin or any tool you have directly. You may find error there, solve and fix your query in your code.

SELECT * FROM tb_pedido Pp INNER JOIN tb_cliente C ON Pp.codCliente = C.codCliente INNER JOIN tb_funcionario F ON Pp.codFuncionario = F.codFuncionario INNER JOIN tb_produto P ON Pp.codProduto = P.codProduto
urtrivedi 276 Nearly a Posting Virtuoso

specify column names as shown in following query. Make sure you spell column right as its in your table. There are more columns in your table then in your $variable list (line 41).

$sql = "INSERT INTO `User` (firstname,lastname, addresslin1, addresslin2, postcode,city, email,password,dttime, verificationcode, status)".
           " values ".
           "('$FirstName', '$LastName', '$AddressLine1', '$AddressLine2', '$PostCode', '$City', '$Email', '$Password', NOW(), '$verificationCode', '0' )";
urtrivedi 276 Nearly a Posting Virtuoso

problem in line number 12 of first code block

$controller->index();

change above to

$controller->Index();

urtrivedi 276 Nearly a Posting Virtuoso

getlisted function must return array either first or second you passing, or anything you process convert it to array and return it in getlisted

urtrivedi 276 Nearly a Posting Virtuoso

When you add any element with same name again the way
if you have only set of elements then code is like

document.formname.elements['elename'].value

if you have more than one set of elements with same names

document.formname.elements['elename'][0].value
document.formname.elements['elename'][1].value
urtrivedi 276 Nearly a Posting Virtuoso

No need to do loops now
Listagg function may help you

https://docs.oracle.com/cloud/latest/db112/SQLRF/functions089.htm#SQLRF30030

You can convert multiple records to single row as per your wish and with better performance

urtrivedi 276 Nearly a Posting Virtuoso

I assume you set session variable USERNAME OR USERID, when user logins
So same can be used as path for your folder when he upolads anything

$uploadpath="/webfolder/docfolder/{$_SESSION['USERID']}";
urtrivedi 276 Nearly a Posting Virtuoso

You have to use only one fpdf object for whole process
Loop through alll payslip record
you have already written code for one payslip, so put that code in your above loop
when next record start add page to your fpdf object
output your fpdf object after loop ends

javascript has no role in your problem

urtrivedi 276 Nearly a Posting Virtuoso

You can use browser cookie for same.

1) When page is loaded first set cookie say 'sendmail'to 0 in bottom of page in javascript.
2) on click of button to send mail set cookiet in javascript 'sendmail'to 1, call php mail handler.
3) When php code is executed check cookie value 'sendmail' if its 1 then only send email, otherwise dont send mail

urtrivedi 276 Nearly a Posting Virtuoso

I used following excel plugin, its very convenient

https://www.mysql.com/why-mysql/windows/excel/

urtrivedi 276 Nearly a Posting Virtuoso

Remove curly braces around $_server variable, its used when you want to embed variable in string.

echo "<form action ='<?=$_SERVER[PHP_SELF]?>' method = 'POST'/>";
echo "<input type='submit' name='off' value='Turn OFF Grow Light'/>";
echo "</form>";
urtrivedi 276 Nearly a Posting Virtuoso

If you can change preference of file type, from excel to csv then after uploading csv file to server, you can use "load data infile" available in mysql

http://dev.mysql.com/doc/refman/5.7/en/load-data.html

urtrivedi 276 Nearly a Posting Virtuoso

You can put one more hidden variable in your form. Like type of post

<input type=hidden name=method id=method value=''>

before submitting set appropriate value whether method is post or ajax, same can be captured in your php handler.

urtrivedi 276 Nearly a Posting Virtuoso

Learn here on your own without any help
http://www.w3schools.com/php/default.asp

urtrivedi 276 Nearly a Posting Virtuoso

I too feel that it was hourly website now its daily one.

urtrivedi 276 Nearly a Posting Virtuoso

put 2 lines in your code after inculde statement, run the page and it will show you error /notice/warning

   include('dataentry/update-connect2.php');

   error_reporting(E_ALL); 
   ini_set("display_errors", 1);

   $sql="SELECT * FROM photos Order by stageno asc";
urtrivedi 276 Nearly a Posting Virtuoso

You need jquery.
Fire onblur even on first textbox entered
call server page using jquery to fetch data from database based on first input
get response and fill second box with response

watch the link
https://www.youtube.com/watch?v=a-uu3LTT-Lc

urtrivedi 276 Nearly a Posting Virtuoso

You need to prepare your script according to the dependencies. If you can sequence insertion script properly, no problem you will face. You need to study all foreign keys and based on that design which table insert will go first and so on till last table.

urtrivedi 276 Nearly a Posting Virtuoso

Here I am using direct year value instead of date in your $year_x variable. You must try to fetch query from database at once. You are firing same query every time for each year, so It is causing time delay.

$year_1=2005;
$year_2=2006;
$year_3=2007;
$year_4=2008;
$year_5=2009;
$year_6=2010;
$year_7=2011;
$year_8=2012;
$year_9=2013;
$year_10=2014;

$sql_gain_data="select series,symbol

,max(if(b.year='".$year_1."',close_price,null)) clyear1
,max(if(b.year='".$year_2."',close_price,null)) clyear2
,max(if(b.year='".$year_3."',close_price,null)) clyear3
,max(if(b.year='".$year_4."',close_price,null)) clyear4
,max(if(b.year='".$year_5."',close_price,null)) clyear5
,max(if(b.year='".$year_6."',close_price,null)) clyear6
,max(if(b.year='".$year_7."',close_price,null)) clyear7
,max(if(b.year='".$year_7."',close_price,null)) clyear8
,max(if(b.year='".$year_9."',close_price,null)) clyear9
,max(if(b.year='".$year_10."',close_price,null)) clyear10

from cash_data a 

inner join (
select series,symbol
,date_format(date_added,'%Y') year, max(date_added) close_date 
from cash_data 
WHERE SERIES='".$series."' AND SYMBOL='".$symbol."'"
group by  series,symbol,date_format(date_added,'%Y') 
) b on b.close_date=a.date_added and a.series=b.series and a.symbol=b.symbol

group by series,symbol";
urtrivedi 276 Nearly a Posting Virtuoso

1) Decide which value you want to show as barcode, like say ITEM CODE
2) You can use font for displaying on report/page to display code in barcode format
3) for eg. if your code is LIKE XYZ3949, you need to encapsulate it with asterisk mark ,
XYZ3949, and display its using any barcode font, eg. 3of9 format font
4) display large size and clear barcode size, so that its captured very well by reader.

urtrivedi 276 Nearly a Posting Virtuoso

1) if(Method()==true)
in this case code under if will only run if Method() return boolean true

2) if(Method())
in this case code under if will always run if Method() return any value. It will not run for false/blank/null.

urtrivedi 276 Nearly a Posting Virtuoso
select a.Cutomer_id, a.Customer_Name, b.total1, c.total2 from  Customers a
left outer join (select customer_id, count(*) total1 from order1 group by customer_id) b on a.customer_id=b.customer_id
left outer join (select customer_id, count(*) total2 from order2 group by customer_id) c on a.customer_id=c.customer_id
ribrahim commented: Thank you for the select statment, but i need the total to be shown as one value not two. Your select statement will result two values tot1 and Tot2. +0
urtrivedi 276 Nearly a Posting Virtuoso

Yes exactly put line 17-18 inside while loop.

urtrivedi 276 Nearly a Posting Virtuoso

Before line number 100 that is before ending while loop break the loop

break;
} //end of while

OR
fix the while loop query code (LINE 21), it is giving more then one record i guess.
OR
If you generating mulitple files, then intialise excel object inside while loop and after generating file, destroy it before while loop ends.

urtrivedi 276 Nearly a Posting Virtuoso

What you have done so far, submit it here?

urtrivedi 276 Nearly a Posting Virtuoso

It not possible to do any operation on same table whose trigger you are writing.

urtrivedi 276 Nearly a Posting Virtuoso
select concat(username,'@irma.ac.in') as email from student
urtrivedi 276 Nearly a Posting Virtuoso

select deptid, deptname, location, employeeid into v_deptid, v_deptname, v_location, v_employeeid from dept where deptname = 'SALES';

Run this query directly in sql developer or terminal. See what data comes. Oracle is case sensitive. Make sure "Sales" spelling match with case also.

lps commented: Yea, and made sure that the deptname in database is exactly 'SALES' without spaces behind or infront. Else will have to use 'like' +6
urtrivedi 276 Nearly a Posting Virtuoso

I used to make exhaustive use of database constraint and features to deal with idotic input from users and super idotic code from developer.

urtrivedi 276 Nearly a Posting Virtuoso

no utf encode is needed in php
just data base column in mysql need to be utf8_unicode_ci

urtrivedi 276 Nearly a Posting Virtuoso

try to change collation to utf8_general_ci of the column where you store your malyalam content

urtrivedi 276 Nearly a Posting Virtuoso

Code seems to be fine, what error message you are getting.

urtrivedi 276 Nearly a Posting Virtuoso

its not error, its warning,
YOu can disable warning in your php.ini configuration file and restart apache service

Make sure following line is off instead of on

display_errors = Off

urtrivedi 276 Nearly a Posting Virtuoso

Run query in phpmyadmin

select date_format(p_date,'%b-%Y'), user_id
, sum( if(str_to_date(concat(p_date,' ',timein),'%Y-%m-%d %H:%i:%s') > str_to_date(concat(p_date,' ',clock_in_eve),'%Y-%m-%d %H:%i:%s') ,1,0)) late_days
     from presence
group by date_format(p_date,'%b-%Y'), user_id having late_days>0
order by date_format(p_date,'%b-%Y'), user_id
urtrivedi 276 Nearly a Posting Virtuoso

This is not good idea what you want. You are making life of admin difficult.

But still it is possible
In user_quiz table , you can keep column last_question_sent

So the moment user submits question, admin will see on his screen the last question submitted by all users.

On admin screen you can allow button for each user "send next question", so it willl increment last_qustion_sent against user's record

Now you can keep timer in javascript/jquery of user screen that will check the status of users question, if it is allowed by admin, next question can be displayed to user.

All above step can be repeated for whole quiz

urtrivedi 276 Nearly a Posting Virtuoso

Explain your case with more details. What you have and what you want to do.

urtrivedi 276 Nearly a Posting Virtuoso

yes, you are right

For courses table

Case 1 (if one person is going to learn subject only once in life time)
keep 2 cols (subject_id, email_id) as primary key

Case 2 (if one person is going to learn same subject again next year due failure)
keep 3 cols (subject_id, year, email_id) as primary key

urtrivedi 276 Nearly a Posting Virtuoso
<table>
<tr>
<td> VALUE OF A</td>
<td>

<?php
    $a=10 ;
    echo $a;
?>
</td>

</tr>
</table>
urtrivedi 276 Nearly a Posting Virtuoso

Embeding is something empower html
http://www.w3schools.com/php/default.asp

urtrivedi 276 Nearly a Posting Virtuoso

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)

urtrivedi 276 Nearly a Posting Virtuoso

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

urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso

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 your page with session_start(); function

5) other variables stay live for that particular page only

urtrivedi 276 Nearly a Posting Virtuoso
SELECT *  FROM `report_card_table` WHERE expirydate <=  date_add( current_date(),interval 3 month)
urtrivedi 276 Nearly a Posting Virtuoso
SELECT *  FROM `report_card_table` WHERE expirydate>=current_date() and expiry_date<=date_add( current_date(),interval 3 month)