Jump to content

Coldman

Members
  • Posts

    51
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Coldman's Achievements

Member

Member (2/5)

0

Reputation

  1. i use this code mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("ecologevents") or die(mysql_error()); $query1=mysql_query("SELECT count(tbltasks.taskid) as count, tbltasks.taskid, tbltasks.campid, tbltasks.taskname, tbltasks.taskdate, tblemployee.Name, tblemployee.Surename, tblemployee.profession, tblemployee.foto, tblemployee.drivinglicense, tblemployee.bexh, tblemployee.medicalscreening, tblcamps.campname FROM tbltasks, tblemployee, tblcamps WHERE tbltasks.taskid = tblemployee.taskid AND tbltasks.campid = tblcamps.campid GROUP BY tbltasks.taskid having count >0 order by tbltasks.taskid "); while($row_list=mysql_fetch_array($query1)){ $taskid = $row_list['taskid']; $taskname = $row_list['taskname']; $campname = $row_list['campname']; $taskdate = $row_list['taskdate']; $employeename = $row_list['Name']; $employeesurname = $row_list['Surename']; $profession = $row_list['profession']; $foto = $row_list['foto']; $leja = $row_list['drivinglicense']; $bexhi = $row_list['bexh']; $kontrollat = $row_list['medicalscreening']; $count = $row_list['count']; if($foto == 'Posedon'){ $foto = "images/ka.gif"; } else { $foto = "images/nukka.gif";} if($leja == 'Posedon'){ $leja = "images/ka.gif"; } else { $leja = "images/nukka.gif";} if($bexhi == 'Posedon'){ $bexhi = "images/ka.gif"; } else { $bexhi = "images/nukka.gif";} if($kontrollat == 'Posedon'){ $kontrollat = "images/ka.gif"; } else { $kontrollat = "images/nukka.gif";} if ($count > 1){ ?> <table style="border:1px solid #B5DAE7;" cellpadding="0" cellspacing="0"> <tr> <td width="80" align="center" valign="middle" bgcolor="#E7EFF2"><?php echo $employeename; ?></td> <td width="80" align="center" valign="middle" bgcolor="#E7EFF2"><?php echo $employeesurname; ?></td> <td width="80" align="center" valign="middle" bgcolor="#E7EFF2"><b><?php echo $profession; ?></b></td> <td width="150" align="center" valign="middle" bgcolor="#E7EFF2"><?php echo $campname; ?></td> <td width="50" align="center" valign="middle" bgcolor="#E7EFF2"><img src="<?php echo $foto; ?>"/></td> <td width="50" align="center" valign="middle" bgcolor="#E7EFF2"><img src="<?php echo $leja; ?>"/></td> <td width="50" align="center" valign="middle" bgcolor="#E7EFF2"><img src="<?php echo $bexhi; ?>"/></td> <td width="50" align="center" valign="middle" bgcolor="#E7EFF2"><img src="<?php echo $kontrollat; ?>"/></td> <td width="150" align="center" valign="middle" bgcolor="#E7EFF2"><?php echo $taskdate; ?><br></td> </tr> </table> </font> <?php } } ?> This way i get just one employee from all tasks please help
  2. Hello ther i am trying to fix an MySql query problem but i can not fix this for some days, any help will be welcome. The problem is this way. I have an query that selects data from three tables and when i display them they are shown all in one table. All i want to do is to split this table in more tables based on the rows that have similar data. this is my query: $query1=mysql_query("SELECT tbltasks.taskid, tbltasks.campid, tbltasks.taskname, tbltasks.taskdate, tblemployee.Name, tblemployee.Surename, tblemployee.profession, tblemployee.foto, tblemployee.drivinglicense, tblemployee.bexh, tblemployee.medicalscreening, tblcamps.campname FROM tbltasks, tblemployee, tblcamps WHERE tbltasks.taskid = tblemployee.taskid AND tbltasks.campid = tblcamps.campid "); so i want to have different tables based on the tbltasks.taskid, every rows that have similar tbltasks.taskid to be shown in one table and sow on. Please help?
  3. Thanks for your replay I tried to configure out but nothing here is my code please let me know how to put that code in this code: $con = mysql_connect("localhost","username","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("database", $con); $result = mysql_query("SELECT * FROM projects where status = 'checked' order by date desc"); while($row = mysql_fetch_array($result)) { $projectid = $row['projectid']; $location = $row['location']; $title = $row['positiontitle']; $company = $row['companyname']; $type = $row['jobtype']; $date = $row['date']; ?> <tr ><td height="50" style="border-bottom: 1px solid #60605e;"><?php echo "<b>$location</b>"; ?> </td><td height="30" style="border-bottom: 1px solid #60605e;"><?php echo "<a href = 'view.php?id=$projectid' style='text-decoration:none; color:#60860d;'><b>$title</b></a><br>$company"; ?></td><td height="50" style="border-bottom: 1px solid #60605e;"><?php echo $type; ?></td></tr> <?php } regards
  4. Hello i am tring to do an query i have searched the net and i can not find what i need. what i need is this. I have an query that i select all rows from one table and display them on the main page (this par is basic and works good). I want to sign all rows that are new for example all posts that have been posted last 5 days to have an sign that tells that those posts are new. look at this site www(dot)specialjobs(dot)net, see the list of jobs all i want is the new jobs to have an sign that tells they are new. New jobs will be all the jobs that are posted last 5 days. Help please.
  5. I am noy using website payment pro as i said i have the shopping cart all ready done, what i want to do is only to take the amount of the cart from buyer ??
  6. which is the easiest way . i will let the user all shipping details to write in my site and then the transaction to be done with pay pall, i don't know how to make a question becuse is my first time doing this. so any help will be good. I am reading at paypal.com but there are many things and i can not configure out what is happening . so what to do ?
  7. The problem is that i don't want credit cart option, i just want simple transaction i think pay pal can do it only with with sending mail ??
  8. I have done my shopping cart, my next job is to check out the order and the buyer to bye the product with paypal what is the best solution with for this job, so simply i have the shopping cart and i want to continue to payment with pay pall. Any help full idea?
  9. I need to update multiple rows with php, any example for this technique ?
  10. $db = mysql_select_db("bia") try this way $db = mysql_select_db("bia", $conn)
  11. this code is working in all browsers but not with IE does any body has idea why ? $size = count($_POST['Quantity']); //echo $size; $i = 0; while ($i < $size) { $cid= $_POST['Cartid'][$i]; $product= $_POST['ProductID'][$i]; $quantity= $_POST['Quantity'][$i]; $Price= $_POST['Price'][$i]; $TotalPrice= $_POST['TotalPrice'][$i]; $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("manvisdatabse", $con); $query = "UPDATE cart SET Quantity ='$quantity', TotalPrice=$Price*$quantity where ProductID='$product' "; mysql_query($query); if(!query) echo "Query lesh"; ++$i; } header("Location: add_to_cart.php"); exit;
  12. header("Cache-control: private"); this works only for back button
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.