urtrivedi 276 Nearly a Posting Virtuoso

on submit you can go on appending content to outerdiv by keeping currentframeno variable. everytime user submit, increment your currentframeno by one and append

document.getElementById("outerdiv").innerHTML=document.getElementById("outerdiv").innerHTML+"<iframe name='frame"+currentframeno+"' id='frame"+currentframeno+"'>your content</iframe>"
urtrivedi 276 Nearly a Posting Virtuoso

I have given infolist column alias, you can use it in your php code.

$information = mysql_query("SELECT informationtype, status ,
         GROUP_CONCAT(DISTINCT informationno 
                   ORDER BY informationno SEPARATOR ',') as INFOLIST
         FROM table
         WHERE informationtype='message' AND status='waiting'
         GROUP BY informationtype, status");
urtrivedi 276 Nearly a Posting Virtuoso

simple solution is make billnumber uniquekey

urtrivedi 276 Nearly a Posting Virtuoso

there is extra comma after dec_count,

it should look like dec_count (remove comma)

urtrivedi 276 Nearly a Posting Virtuoso
$result=mysql_query("SELECT count(*) total
, sum(if(`status` = '".constant('REFERRAL_STATUS_COMPLETED')."',1,0)) com_count
, sum(if(`status` = '".constant('REFERRAL_STATUS_DECLINED')."',1,0)) dec_count,
, sum(if(`status` = '".constant('REFERRAL_STATUS_REFERRED')."',1,0)) ref_count
FROM ".constant("TBL_USER_REFERRALS")." where `referrer_uid`='$referrer_uid' ");
phplover commented: Works Perfectly Thank you! :) +1
urtrivedi 276 Nearly a Posting Virtuoso

post your mysql table script with some sample data of all four types

urtrivedi 276 Nearly a Posting Virtuoso
$result=mysql_query("SELECT count(*) total, sum(if(`referrer_uid`='abc',1,0) abc_count,
, sum(if(`referrer_uid`='pqr',1,0) pqr_count,
, sum(if(`referrer_uid`='xyz',1,0) xyz_count
FROM ".constant("TBL_USER_REFERRALS"));

output

total, abc_count, pqr_count, xyz_count
45, 10, 15, 20


You can access result as you access any other mysql result by using column name

urtrivedi 276 Nearly a Posting Virtuoso

if you are not keeping billnumber blank and if you can insert billnumber with orderid, then simply define billnumber as unique key. Then it will not allow duplicate billnumbers.

urtrivedi 276 Nearly a Posting Virtuoso

I faced same problem, I guess your billnumber column may remain blank for sometime.
So I created on more table say billmaster (billnumber pk). If you want to generate bill number every year then (billnumber pk, year pk).

Now in your billnumber generation. you fetch max number from billmaster table then insert it in billmaster table, return that billnumber to calling insert statment.

I am sure duplication will never happen again.

urtrivedi 276 Nearly a Posting Virtuoso

Here is your query

$information = mysql_query("SELECT informationtype, status and informationno,
         GROUP_CONCAT(DISTINCT informationno 
                   ORDER BY informationno SEPARATOR ',')
         FROM table
         WHERE informationtype='message' AND status='waiting'
         GROUP BY informationtype, status");
urtrivedi 276 Nearly a Posting Virtuoso

member ->|-------|<- sport -||-------|<- coach

urtrivedi 276 Nearly a Posting Virtuoso

I think coach is not directly related to member, coach is related to member through sport.

debasisdas commented: agree +9
urtrivedi 276 Nearly a Posting Virtuoso
$myurl="About us";
$mynewurl=strtolower(str_replace(" ","",$myurl));
urtrivedi 276 Nearly a Posting Virtuoso

I have added else part

if($value != 'No Preference')    
{          
        $arrQueryParts[$key] = " AND ".ucwords($key)."='".$value."'";    
}
else
{          
        $arrQueryParts[$key] = "";    
}
urtrivedi 276 Nearly a Posting Virtuoso

I have added else part

if($value != 'No Preference')    
{          
        $arrQueryParts[$key] = " AND ".ucwords($key)."='".$value."'";    
}
else
{          
        $arrQueryParts[$key] = "";    
}
urtrivedi 276 Nearly a Posting Virtuoso

If you have more than one textbox with same id that is qty in then that may create problem

urtrivedi 276 Nearly a Posting Virtuoso
<tr><td><b>&nbsp;&nbsp; History  Of Donation in Health Care </b></td><td width=300px>&nbsp;&nbsp;" .  $row [9] ."</td></tr>

<tr><td><b>&nbsp;&nbsp; Postal Address </b></td><td width=300px>&nbsp;&nbsp;" .  $row [17] ."</td></tr>

I have written <td width=300px> in value part (2nd column of table). So maximum column width will be 300. do not set width in another row values. You may adjust width according to your data string length of history or postal which ever is bigger

monta2020 commented: MY DEAR I DON"T KNOW HOW TO THANK U !! I LOVE U MAN :) :) it works out +1
urtrivedi 276 Nearly a Posting Virtuoso

<table width=500px>
<tr>
<td width=10%>1 </td>
<td width=40%>2 </td>
<td width=40%>3 </td>
</tr>

<tr>
<td >4 </td>
<td >5 </td>
<td >6 </td>
</tr>

<tr>
<td >7 </td>
<td >8 </td>
<td >9 </td>
</tr>
</table>

urtrivedi 276 Nearly a Posting Virtuoso

Then you need to create javascript function. and you must use on_blur even on qty textbox.

urtrivedi 276 Nearly a Posting Virtuoso

what are you expecting,

1) you want to show amount the moment user enters one qty
or
2) you want to calculate amount when user all qty, submits page, then show amount for all row

urtrivedi 276 Nearly a Posting Virtuoso

attach your php page and mysql script for this table here

urtrivedi 276 Nearly a Posting Virtuoso

do not disabled rate text box, use readonly

remove disabled="disabled"

<td class="rate"><input name="prate" type="text"             class="prate" id="prate" value="<?php echo $prate;?>" readonly="true" /> </td>
urtrivedi 276 Nearly a Posting Virtuoso
$strVarName = $key . "F";
echo $strVarName; //check what is the value of $strVarName, I am sure it is not "no preference"
urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso

first

$arrQueryParts[$key] = " " . ucwords($key) . "='" . mysql_real_escape_string($$strVarName) . "'";

have you intentionally placed $$strVarName


second

while($row = mysql_query($strQuery))
{

about code does not look valid

it should be like following

echo $strQuery;//copy the printed query from browser and run in phpmyadmin and see whether it gives expected result or not.

$result=mysql_query($strQuery));

while($row=mysql_fetch_assoc($result))
{
.
.
.
urtrivedi 276 Nearly a Posting Virtuoso
<select name = "fld_wherehear" id="fld_wherehear" >
					  <option value = "0" >Select...</option>
	<option value = "1" <?php echo (($_POST["fld_wherehear"]==1)?"selected":"") ;?> >Internet</option>
	<option value = "2" <?php echo (($_POST["fld_wherehear"]==2)?"selected":"") ;?>>Newsletter</option>
	<option value = "3" <?php echo (($_POST["fld_wherehear"]==3)?"selected":"") ;?>>Friend</option>
	<option value = "4" <?php echo (($_POST["fld_wherehear"]==4)?"selected":"") ;?>>Magazine</option>
	<option value = "5" <?php echo (($_POST["fld_wherehear"]==5)?"selected":"") ;?>>Other</option>
</select>
urtrivedi 276 Nearly a Posting Virtuoso

Somebody will only able to help you, if you do not post your code or sample here.
No body can visualize by just reading the statement.

urtrivedi 276 Nearly a Posting Virtuoso

I think, join is mysql reseverd keyword so rename it and then try again.
Also you must write only one query. Here you are writing so many insert queries for one record (I GUESS). Build single insert query.

urtrivedi 276 Nearly a Posting Virtuoso

http://www.apphp.com/php-datagrid/index.php?page=downloads

You may download and use free 4.2.8 version.

urtrivedi 276 Nearly a Posting Virtuoso

http://www.apphp.com/php-datagrid/index.php?page=downloads

You may download and use free 4.2.8 version.

urtrivedi 276 Nearly a Posting Virtuoso

Have you tried quotes around href

<a href='".$r1[10]."' target=_blank>View</a>

urtrivedi 276 Nearly a Posting Virtuoso

in the begining you may intialize
$qu="";

urtrivedi 276 Nearly a Posting Virtuoso

Warning is coming because you are using $qu before initializing it.

You may write follwoing statements to ignore error in page_edit_parse.

error_reporting(0);
ini_set("display_errors", 0);

urtrivedi 276 Nearly a Posting Virtuoso

<td style="background-image:baloon.png" >

urtrivedi 276 Nearly a Posting Virtuoso

following query is only for MSSQL. Also to update you must have some relation between the two table.

UPDATE tableA
    SET column_in_A = b.ColumninB
    FROM tableB b
    WHERE tableA.keycolumn1 = b.keycolumn1 and tableA.keycolumn2 = b.keycolumn2
urtrivedi 276 Nearly a Posting Virtuoso

what are other columns in your cms table

urtrivedi 276 Nearly a Posting Virtuoso

I think you are missing 's' getElementsByName

click here for more details

<html>
<head>
<script type="text/javascript">
function getElements()
  {
  var x=document.getElementsByName("x");
  alert(x.length);
  }
</script>
</head>
<body>

<input name="x" type="text" size="20" /><br />
<input name="x" type="text" size="20" /><br />
<input name="x" type="text" size="20" /><br /><br />
<input type="button" onclick="getElements()" value="How many elements named 'x'?" />

</body>
</html>
urtrivedi 276 Nearly a Posting Virtuoso

suppose $catch_s= 'john'

so instr(members,'john') will return you position of 'john' in members column. if it finds john in members columns it will return non zero value, if it did not find john in member column it will return 0

if we found john in member column we set allowedit to 1 for that row, the row in which members do not have john it will set allowedit to 0,

this allowedit flag we can use in our php code to enable/disable html element or whatwever we want.

urtrivedi 276 Nearly a Posting Virtuoso

where is student id, how will you know, that who answered what?

urtrivedi 276 Nearly a Posting Virtuoso

when user submit data, accept only from date, to_date, then in processing form , before inserting we can find working days using php/mysql syntax.

urtrivedi 276 Nearly a Posting Virtuoso

you may find thing in the sql query itself

$query="select assignment_id, assignment_name, members, remarks, 
if(  instr(members,'$catch_s')>0 , 1, 0 ) as allowedit 
from assignment_table";

.
.
..other code
.
.
.

if ( $myrow2['allowedit']=='1')
    echo "yes";
else 
    echo "no";
urtrivedi 276 Nearly a Posting Virtuoso

forget my preovis post

give only single dot instead of double dot

$this->Image('./images/gemsheader.png',10,8,190);

urtrivedi 276 Nearly a Posting Virtuoso

Your image directory structure must be like attached file

urtrivedi 276 Nearly a Posting Virtuoso

whats new in your post totmato.pgn

urtrivedi 276 Nearly a Posting Virtuoso

OR

SELECT * from tablename where
CONVERT(VARCHAR(10), starttime, 105) =CONVERT(VARCHAR(10), endtime, 105)

debasisdas commented: yes , that should work perfectly fine. +8
buddylee17 commented: Good examples! +4
urtrivedi 276 Nearly a Posting Virtuoso

select * from tablename where
day(starttime)=day(endtime)
and month(starttime)=month(endtime)
and year(starttime)=year(endtime)

urtrivedi 276 Nearly a Posting Virtuoso

I think he means location of file with file name

Have you tried
'./abc.php' //in case reside in same folder
'./subfolder/abc.php' //in case reside in sub folder
'../upperfolder/abc.php' //in case reside in folder which one level up

urtrivedi 276 Nearly a Posting Virtuoso

in the begining (or before using session variable) of all pages make sure you write

session_start();

urtrivedi 276 Nearly a Posting Virtuoso

You must also use session_start() in your generatepdf.php before using session variable. (this is not something causing problem, it is addtional hint)

Now I never merge all folders in one following is my directory structure

webroot
|--myphpfiles(folder)
|--generatepdf.php
|--fpdf(folder)
|--fdpf_support_folders
|--fpdf.php

so when I refer fpdf in my generatepdf.php, i will write

require(../fpdf/fpdf.php)

Diretory structure is attached

Check how your files are stored

urtrivedi 276 Nearly a Posting Virtuoso

SELECT DATE_FORMAT( current_date, '%d-%M-%Y' )