ipwnzphp
Members-
Posts
129 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
ipwnzphp's Achievements
Member (2/5)
0
Reputation
-
Thanks! worked like a champ!!
-
I have this script i am coding and it just repeats the checkboxes over and over... i need it to only show the checkboxes for each amentie once and show checked if it is in the database... <? $result = mysql_query("SELECT * FROM amenties ORDER BY id DESC"); while ($row = mysql_fetch_array($result)) { foreach ($explode_amen as $aman) { if($aman == $row['id']) { $picked = "checked"; } else { $picked = ""; } ?> <div style="float:left; width:210px;"><input name="amen[]" type="checkbox" id="amen[]" style="width:25px;" value="<?=$row['id']?>" <?=$picked?> /><?=$row['amen_name']?></div> <? } } ?>
-
Still dont understand how to sort it out though into tables of level 1, level 2 and so on until level 5.
-
Let me be more clear.. LEVEL 1 $level_one = mysql_query("select * from users where ref_by = '$username'"); while ($level_one_do = mysql_fetch_array($level_one)) { $level_one_do['Username']; LEVEL 2 $level_one = mysql_query("select * from users where username = '$level_one_do[username]'"); while ($level_one_do = mysql_fetch_array($level_one)) { $level_one_do['Username']; } } Just some rough code..
-
How i need this code to work is like this If table 1 show data form mysql for table 1, if table 2 show data for table 2. but the thing is that the data for mysql 2 comes form mysql 1. and so on for 5 times
-
i posted all the code i had!
-
I have a while loop that is making a table 5 times for me. The issue that i am having is i need to run 5 different mysql query's for the 5 different tables that the loop is making for me. How would i go about doing this? Here is my code <? $i=1; while ( $i <= 5 ) { ?> <table width="600" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="414" height="35" colspan="5"><strong>Level <?=$i?></strong></td> </tr> <tr> <td height="25"><div align="center">Join Date</div></td> <td><div align="center">Member Name</div></td> <td><div align="center">Username</div></td> <td><div align="center">Free/Pro</div></td> <td><div align="center"></div></td> </tr> <? $level_one = mysql_query("select * from users where ref_by = '$username'"); while ($level_one_do = mysql_fetch_array($level_one)) { $status = $level_one_do['status']; if($status == 1) { $status_type = "Free"; } else { $status_type = "Pro"; } ?> <tr> <td height="35"><div align="center"></div></td> <td height="35"><div align="center"></div></td> <td height="35"><div align="center"> <?=$level_one_do['Username']?> </div></td> <td height="35"><div align="center"></div></td> <td height="35"><div align="center"><img src="images/email_forward-32.png" width="25" height="25"></div></td> </tr> <? } ?> </table> <? $i++; } ?>
-
I have a app that i am working on and it has got me a lil fired up this am!! lol. here is what i am trying to do. My Issue I am trying to get the total number of hours worked form the db by adding the start_time and the end_time together. My Code Snippet <? $results = mysql_query("SELECT * FROM `simp_time_logger` WHERE p_id = '$id'") or die (mysql_error()); while ($rows = mysql_fetch_array($results)) { $explode_time = explode(" ", $rows['start_time']); $explode_time2 = explode(" ", $rows['end_time']); $start = $explode_time[0]; $end = $explode_time2[0]; $time = $start + $end; } echo $time; ?> My Error Says the number of hours worked is 16, How can this be when the start time is 8:29:55 and the end time is 8:29:57 Now the time is stored in the db like this 8:29:55 AM i am using explode to break off the AM/PM form it. I just need it to read the rows of the table and then get the correct total of hours worked to display. Any help will be greatly appreciated. Thanks!
-
any one?
-
This mysql/php data is display twice in the options for the drop down. It should only display the results once and not twice. <select name="altcaddy2" id="altcaddy2"> {php} $s_id = session_id(); $checkouts = mysql_query("SELECT * FROM `caddie_checkout_storeage` WHERE checkout_session_id = '$s_id'") or die (mysql_error()); while ($get_checkouts = mysql_fetch_array($checkouts)) { $date_id = $get_checkouts['date_id']; $datezs = mysql_query("SELECT * FROM `caddie_schedule` WHERE status='enable' && schedule_id = '$date_id'") or die (mysql_error()); while ($get_datezs = mysql_fetch_array($datezs)) { $datezss = mysql_query("SELECT DISTINCT member_id FROM `caddie_schedule` WHERE status='enable' && start_date = '$get_datezs[start_date]'") or die (mysql_error()); while ($get_datezss = mysql_fetch_array($datezss)) { $caddie_atl = mysql_query("SELECT * FROM `member` WHERE status='enable' && member_id = '$get_datezss[member_id]'") or die (mysql_error()); $get_caddie_atl = mysql_fetch_array($caddie_atl); $caddie_id = $get_caddie_atl['member_id']; {/php} <option value="{php} echo $caddie_id; {/php}">{php} echo $get_caddie_atl['first_name']; {/php}</option> {php} } } } {/php} </select> Example: <option value="43">Sooners</option> <option value="44">Emerge</option> <option value="45">Panita</option> <option value="43">Sooners</option> <option value="44">Emerge</option> <option value="45">Panita</option> Thanks!
-
$duedate = $items_pull['age_in_days']; echo $duedate."<br><br>"; Shows things like 733997 733997 733997 733997 733999 733999 734002 733997 733997 733997 and $regdate shows the same thing. 733997 733999 733999 734002
-
It sent an email for every service Here is my code require("dbconnect.php"); $hosting_get = mysql_query("SELECT TO_DAYS(nextduedate) AS age_in_days_due, userid, id, billingcycle, username FROM `tblhosting` WHERE domainstatus = 'Active'"); while ($hosting_pull = mysql_fetch_array($hosting_get)) { $userid = $hosting_pull['userid']; $orderid = $hosting_pull['id']; $billingcycle = $hosting_pull['billingcycle']; $regdate =$hosting_pull['age_in_days_due']; $username = $hosting_pull['username']; $items_get = mysql_query("SELECT TO_DAYS(duedate) AS age_in_days FROM `tblinvoiceitems` WHERE relid = '$orderid'"); $items_pull = mysql_fetch_array($items_get); $duedate = $items_pull['age_in_days']; $dodatemath = $regdate - $duedate; if($dodatemath >= 32) { $to = ''; $subject = 'Invoice Aduit Report'; $message = "There is no invoice for ". $username; @mail($to, $subject, $message); } }
-
Testing once again.. now!
-
$dodatemath = $regdate - $duedate; if($dodatemath >= 32) { // mail functions here } That correct?
-
How would i do the 32 day delay?