Jump to content

severndigital

Members
  • Posts

    355
  • Joined

  • Last visited

Everything posted by severndigital

  1. here's what i got SELECT b.bowlName, DATE_FORMAT( b.bowlDate, '%a %m/%d/%Y' ) AS bowlDate, DATE_FORMAT( b.closing, '%m/%d/%Y %h:%i:%s%p' ) AS bowlClose, ent.status AS userStatus FROM bowlList b LEFT JOIN bowlEntries ent ON b.Id = ent.Id WHERE b.complete = '0' AND ent.userId = '$user_id' it almost works, but i want the list to display items that are in the bowlList table that are not in the bowlEntries table. right now it works only if the $user_id is in the bowlEntries list. .. i thought a LEFT JOIN would give me the results i needed, but i won't give me the items that are NOT in the bowlEntries field. any help would be great. Thanks in advance, -C
  2. Thank you for all the posative feedback. I will make the adjustments and see where it takes me. Also, You are correct in assuming that more content will be added as the project progresses. However i am using over a "modular" framework very basic, but similar to joomla in it's working. So i can't say for sure what will be on either side. Thanks again, I will let you know how i make out. -C
  3. ok .. so i am working on a template file and i would like my innerleft and right divs to run the height of the area they are in not matter what thier content size is. I included a screen shot to help explain .. the problem area is the red line on the left. that is were the div ends, i would like the div to go to the bottom like the one one right. the only reason the right one is at the bottom is becuase it is bigger than the left, i would insert content to make the left one longer, the same problem happen on the right. anyone know how to fix this?? my css is as follows //for the wrapper they are in #tmcInnerWrapper{ margin-left: auto; margin-right: auto; width: 900px; border: 1px solid #333; } //for the left #tmcLeftContent{ width: 25%; float: left; border-right: 1px solid #999; border-bottom: 1px solid #F00; padding: 3px; } //for the right #tmcRightContent{ width: 25%; float:right; border-left: 1px solid #999; padding: 3px; } Any help would be great. thanks, -C [attachment deleted by admin]
  4. Well after a few hours of working through it on paper i was able to apply a solution to this. Gonna post it here for two reasons. 1. in the off change someone else will need it. 2. in case i forget what i did. so in the template file i did this if($topNav == 1){ //area is turned on $topString = '<div id="topNav">'; } $endString = '</div>'; if(!empty($topString){ echo $topString; includeModules(2); echo $endString; } that seemed to do the trick. -C
  5. good catch gevans ... didn't notice the <option> tag before.
  6. using a union would probably be the best way your query would look something like this. $query = "SELECT questionID, question FROM security_questions WHERE questionID = '$new_question' UNION SELECT questionID, question FROM security_questions WHERE questionID != '$new_question'"; That should get you the first item followed by the rest.
  7. you should modify posts instead of posting your own thread .. makes us think people are helping you already when they really haven't. the easy way would be to do this in two queries, but you should be able to do it with and groupr by modifier of some type http://dev.mysql.com/doc/refman/5.1/en/group-by-modifiers.html or better yet if you are getting the same information for all the items in the query you can do a UNION http://dev.mysql.com/doc/refman/5.1/en/union.html
  8. agreed it is a syntax issue just take the quotes out of your first parameter and it should work.
  9. just an include_once call for each script should work include_once 'script1.php'; include_once 'script2.php'; save that to a file and run it .. it should pull both scripts in and run them in sequence.
  10. I'm not 100% sure, but it looks like it might be a syntax problem .. your if statment says if($value == 'square'){ do this }elseif($value == 'square'){ do this instead } make sense? if you have an array of which ones are checked shouldn't it look like something like this? foreach($words as $value){ if($value == checkedSignal) //don't know what you are using to tell weahter they are checked or not. echo '<input name="keywords[]" type="checkbox" id="square" value="square" checked="checked"/> Square'; }else{ echo '<input name="keywords[]" type="checkbox" id="square" value="square" />Square'; } } hope that helps ..
  11. OK .. I have a template.php included in an index.php file, that shows certain divs based off of variables set in the index.php. I would like to control what shows up in those divs using a database table. I'll show you what i have so far. //index.php switch($view){ default: $topNav = 1; $leftNav = 0; $rightNav = 0; $content = '/login/login.php'; break; include_once 'template.php'; //the template file $centerStyle = ''; $topString = ''; if($incTop == 1){ $topString = ' <div id="tmcTopNav"> ' . importModules(2) . ' </div>'; } the template file goes on to include all of the normal html information and then gets to where it would include the divs .... <?php echo $topString; ?> What i would like to do is write a function that looks for all the files that should go into the database. and then puts the correct file where it needs to go. I have the function built, but i don't know how to include the file(s) so that they don't show up in the top left of the page. //function so far. function importModules($location) { //retrieve all active modules $dBase = new pgConnect(); $modules = $dBase->retAssoc("SELECT name FROM modules WHERE active='1' AND location='$location'"); for($i = 0; $i <count($modules); $i++){ include_once MOD_DIR . $modules[$i]['name'] . '/' . $modules[$i]['name'] . '.php; ?>'; } } does anyone have any suggestions?? Thanks, -C
  12. what would be the benefit of changing them?? doesn't the browser build the full path for you at runtime? if you would hard code them you would have a difficult time transporting your pages if you changed domain names or directory names. this way your code is very flexible. not trying to start an argument .. just asking the question
  13. still can't seem to get this to work. I tried using the flush() command and also tried adding white spaces before the message (256 of them to be exact) still no luck. any other ways i can get this to work?? using javascript or something?? Thanks, C
  14. Thanks, I will be messing around with this after lunch. BTW .. i am using this to batch compress directories, so it will be fairly intensive. It's for a specialized project though, that will be running only locally on the machine. Thanks again -C
  15. ok .. so i want to have a message display to the browser after each instance of the for loop is complete. is there a way to do this in PHP or will i have to use Javascript to make it happen?? example $arrayList = array(1,2,3,4,5); for($i = 0;$i < count($arrayList); $i++){ //do something here. // then echo completion information echo 'Process: ' . $arrayList[$i] . ' Complete <br />'; } it works but shows all the echos after the script runs ... is there a way to echo the string directly after the loop runs ?? Thanks, -C
  16. i got it worked out. it seems i had to put the dir of the 7az.exe into the command to look like this c:\7za457\7za a -mx=9 c:\sandBox\178800.7z c:\ms6\178800
  17. I am using wamp on a windows XP machine and I am having trouble running command lines from with in PHP. the following example works. $output = shell_exec('dir /B /A:D c:\\ms6'); echo var_export($output,TRUE); it works and returns the desired results. however this one does not. $output = shell_exec('7za a -mx=9 c:\\sandBox/cmdCompTest.7z c:\\ms6'); echo var_export($output,true); When i run the shell command from the command prompt it works just fine and creates the cmdCompTest.7z file just fine. But when I run the command from within PHP i do not get anything. I have tried both the exec() and shell_exec() command with no success. I have implemented similar things in PHP on linux machines, but this is my first attempt at the shell_exec or exec commands on windows box. Any help would be great. Thanks, -C
  18. * UPDATE * SO far i got this SELECT prd.name, prd.short_desc, SUM( op.qty ) AS total_usage FROM prod_list prd LEFT JOIN order_prods op ON prd.id = op.prodid WHERE prd.active = '1' GROUP BY prd.id LIMIT 0 , 30 This includes the NULL value products, but I can't seem to figure out how to implement the daterange on the third table (order_list) Once I include that table, It removes all the null values. Any ideas??
  19. So .. i have this query SELECT prd.name, prd.short_desc, prd.qty_in_stock, SUM( ordprods.qty ) AS order_qtys, ord.datemade FROM prod_list prd INNER JOIN order_prods ordprods ON prd.id = ordprods.prodid INNER JOIN order_list ord ON ordprods.orderid = ord.orderid WHERE ord.datemade BETWEEN '2008-11-01' AND '2008-11-30' GROUP BY prd.id ORDER BY order_qtys ASC The only problem is it does not include products from the prod_list table that were not part of an order. Is there away to call this query and get the results for all products from prod_list even if they were not part of an order from order_prods Thanks, -C
  20. i have a query that's not working perfectly. SELECT * FROM prod_list WHERE access_levels LIKE '%$user_level%' AND name LIKE '%$search%' OR short_desc LIKE '%$search%' OR description LIKE '%$search%' AND active = '1' what happens is, if short_desc or description or name match, it returns results reguardless of the access_level or the active I believe it's the use of OR, but i'm not sure how to produce the correct results without using OR. Any ideas would be great. Thanks, C
  21. you want to make a backup of your entire mySQL?? or just the databases / tables??
  22. i need to get the SUM of a field from one table based off a range in another table here's what i think it should should like in the end, but of course it isn't working SELECT SUM(prd.qty) FROM order_products prd WHERE order_list.datemade BETWEEN UNIX_TIMESTAMP('2008-10-01') AND UNIX_TIMESTAMP('2008-10-31') i should mention that the tables look like this order_list table id datemade etc.... order_prods table id orderid prodid qty etc... i just can't get this query to show up. Any suggestions?? Thanks -C
  23. Just to keep the thread going and let anyone know where i am at. i also tried the following with no avail SELECT ord.*,usr.*,ship.* FROM order_list ord CASE WHEN shiptype = 'prof' THEN (INNER JOIN user_list usr ON ord.userid = usr.id INNER JOIN user_list ship ON order.userid = ship.id) WHEN shiptype = 'brief' THEN (INNER JOIN user_list usr ON ord.userid = usr.id INNER JOIN tbl_brf_shipping ship ON order.userid = ship.id) WHEN shiptype = 'joan' THEN (INNER JOIN joan_user_list usr ON ord.userid = usr.id INNER JOIN joan_user_list ship ON order.userid = ship.id) END WHERE complete = '1' no go. if anyone knows how to do this .. please help out
  24. I would like to do the following, but I can't seem to figure out if it's possible and if so the syntax. "SELECT ord.*,usr.*,other.* FROM order_list ord IF(ord.shipid < 300000 THEN INNER JOIN user_list usr ON ord.shipid = usr.id) elseif(ord.shipid > 300000 THEN INNER JOIN other_list other ON ord.shipid = other.id) WHERE ord.complete = 1" can anyone point me in the right direction?? Thanks, C
×
×
  • 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.