Jump to content

1042

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

1042's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Concrete5 is a fine CMS with a growing user base. The structure is well defined, it is very easy to theme and create custom modules and is very expandable, i have work with Drupal and Joomla for a few years now and after i tried Concrete5 i switch to them, the security issues have been fixed but as with any web application nothing is 100% secure although the concrete guys are fast to fix issues and release security patches, i mean look at Drupal and their issues; http://secunia.com/advisories/search/?search=drupal Concrete5 was a commercial product before they release it as open source so the company actually got paid to make it better, unlike Drupal or Joomla. The forums are very supporting as well, anyway i encourage you to give it a try, it doesn't hurt to learn something new and i really think Concrete5 will soon be very popular. just my 2 cents.
  2. this is what i ended up doing; $number="161321"; $number = substr(chunk_split($number, 2, ':'), 0, -1); //If $number is '1234567', result is '1 234 567'. //echo $number; echo date('h:i:s ', strtotime($number)); is there a better way?
  3. That's weird, im using php 4.4.7, would that be an issue?
  4. Im pulling information from an xml file tha returns the time formatted like this 161322, how would i format the result like this, 16:13:22 ? i tried: $thetime="160000"; echo date('H:i:s A', strtotime($thetime)); but all i get is 00:00:00 AM any help is greatly appreciated, thanks.
  5. You can do this; print_r($_COOKIE);
  6. Im trying to run this query to get totals on per month basis, so far this is what i have below; PHP Code: //run the query to get the totals on per month basis// $query = "SELECT order_date, SUM(grand_total) FROM order_details WHERE order_status='completed' GROUP BY order_date order by order_date"; $result = mysql_query($query) or die(mysql_error()); // Print out results while($row = mysql_fetch_array($result)){ $order_date=$row['order_date']; // show the results by month// echo "$order_date = $". $row['SUM(grand_total)']; echo "<br />"; } this returns the following format: 2007-06-19 17:51:15 = $117.69 2007-06-19 17:58:57 = $76.99 2007-06-19 18:08:46 = $137.5 2007-06-19 18:22:25 = $94.19 2007-06-20 10:57:50 = $82.41 2007-06-21 15:09:21 = $94.19 2007-07-17 11:05:39 = $94.2 2007-08-19 17:52:52 = $26.5 but what i would like is to get the following format july, 2007 = $total June, 2007 =$total in other words group the totals for the month for each month, hope i made sense. what would be the best way to do this? thanks all for the help
  7. $select_result = mysql_query("SELECT * FROM $dbTable ORDER BY 'Score' ASC", $conn); No need for quotes around Score, try that.
  8. A nice way to do this would be AJAX, you show Tours and based on the tour they select theywill get a drop down with the course belonging to each tour, im i correct? anyway, here is a good tutorial that help me when i had to do something similar to what you are doing now. http://www.scriptygoddess.com/archives/2007/02/13/store-locator-using-php-and-ajax/ you just need a few changes to customize it to you needs.
  9. You are not closing you else if statement on line 17, you need to close it on line 26 see below, i added for you at the end; else if (isset($PHP_AUTH_USER)) { if (($PHP_AUTH_USER != "a") || ($PHP_AUTH_PW != "ab")) { header('WWW-Authenticate: Basic realm="My Private Stuff"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } }
  10. Hi, checkout http://www.phpclasses.org , im sure you can find the class you need there.
  11. Hi, Check out this link http://dhtmlgoodies.com/index.html?whichScript=ajax_client_lookup , you can start with this and modify it to achieve what you need. Cheers.
  12. this is what i got Unknown column 'sd.staff_office' in 'field list' what does sd. stand for, sorry if is a dumb question
  13. Hello mjdamato , thanks for the help, here is the code; $sql = "SELECT users.*, sd.staff_office FROM users LEFT JOIN staff_departments sd ON users.staff_office = sd.dep_id ORDER BY sd.dep_name"; $result = mysql_query($sql); $columns = 4; $deptName = ""; $currentColumn = 0; echo "<table>\n"; while ($row = mysql_fetch_array($result)) { if ($currentColumn == $columns) { echo "<\tr>"; $currentColumn = 0; } if ($row['dep_name'] != $deptName) { $deptName = $row['dep_name']; echo "<tr><td colspan=\"{$columns}\"><b>{$deptName}</b></td></tr>"; $currentColumn = 0 ; } if ($currentColumn == 0) { echo "<tr>"; } echo "<td>{$row['staff_name']}</td>"; $currentColumn++; } echo "</tr></table>"; however im getting this error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in path\to\site\staffonly_new\print2.php on line 104 any ideas? thanks
  14. Hello all, i have this code that shows the department categories in a 4 column format, my problem is how do i insert the names of the people that belong to that category to be shown under the category name? i have 2 tables, one is the department categories and the other one is users, under users there is a field that is called staff_department..here is the code that shows the categories only; PHP Code: $sqlCat = MySQL_Query("SELECT dep_name FROM staff_departments ORDER BY dep_name"); $columns = 4; $numRows = MySQL_Num_Rows ($sqlCat); $rows = ceil($numRows / $columns); while($category = MySQL_Fetch_Array($sqlCat)) { $cat[] = $category['dep_name']; } echo '<br><br>'. '<table cellpadding="0" cellspacing="0" align="center" width="100%" border="1">'; for($i = 0; $i < $rows; $i++) { echo '<tr>'; for($j = 0; $j < $columns; $j++) { if(isset($cat[$i + ($j * $rows)])) { echo '<td><strong>'. $cat[$i + ($j * $rows)] . '</strong></td>'; } } echo '</tr>'; } echo '</table>'; i guess im missing a query to show the names under the category example SELECT * FROM users WHERE staff_department = '$sqlCat [dep_name]' but where do i do this? thanks to all in advance
  15. Hi, not sure if this would help but try echoing the variable that you are trying to pull the info from, like this; [code]<? $variable = "test"; echo "$variable; ?>[/code] cheers.
×
×
  • 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.