Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by floridaflatlander

  1. I'm trying to make a menu that is a menu only of major categories with a count or it has sub-categories with a count.

    Some major categories have sub-categories and some don't.

    This morning this works but last night I was getting a record with a id_parent of  0 and a count of 0(and I don't know why).

    Does this sql make since and would it work consistently?


    $q = "SELECT item, slug FROM category WHERE (count >= 1 AND id_parent = 0) OR id_cat IN (SELECT id_parent FROM category WHERE count >= 1 AND id_parent >= 1)  GROUP BY item"; 


    The table the menu comes from looks like this ..

    id_cat | id_parent | slug | item | count

    1 | 0 | boats | Boats | 0

    2 | 0 | autos | Cars & Trucks | 0

    3 | 1 | inshore-boats | Inshore Boats | 2

    4 | 2 | trucks | Trucks | 1

    5 | 0 | atvs | ATVs | 2

  2. I believe it was incompetence rather than an attack.  I've worked for a hosting company before, and one drowsy sysadmin is capable of bringing the whole datacenter offline.


    Interesting, I wonder if someone needs to start looking for a new job.

    Either way it's going to cost gdaddy some customers. It brought sopa to light for those who didn't know gdaddy's stance on this issue and it also brought other gdaddy performance issues to light.

  3. I know this is the same old same old error people get but I can't figure it out.


    I've checked my db table and there is an id_prod, id_cat & id_mem. All spelled correctly.

    What's odd is I ran a test (it's commented out now) an it worked, returning the id_prod #159


    But when I run same while loop just under it I get the mentioned error.



    // Check if the form has been submitted:
    if (isset($_POST['submitted'])) {
    if ($_POST['sure'] == 'Yes') { 
    	// get list of items to deleteing
    	$q = "SELECT id_prod, id_cat FROM product WHERE id_mem = '$user' AND publish <= 1"; // Less than very important
    	$r = mysqli_query ($dbc, $q) or die("Error: ".mysqli_error($dbc));
    // For prob solving, mysqli_fetch_array worked here returning the id_pod #159 but not below
    /*	if ($r){
    	while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)){
    	 echo ''.$row['id_prod'].'<br />';
    	} */
    	if ($r && (mysqli_num_rows($r) >= 1)) {
    	// delete pics of items where publish <= 1
    	while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)){ // <-ERROR here same while as above
    		// Delete item's records and files in order of importance. From least important to most
    		$q2 = "SELECT thumb, photo FROM photos WHERE id_prod = ".$row['id_prod']."";
    		$r2 = @mysqli_query ($dbc, $q2);// or trigger_error("Query: $q\n<br />MySQL Error: " . mysqli_error($dbc));
    		if ($r2 && (mysqli_num_rows($r2) >= 1)){
    			// needs to be a while loop, may be more than one
    			while ($row2 = mysqli_fetch_array($r2, MYSQLI_ASSOC)){
    			unlink('../images/members/'.$row2['thumb'].''); // Remove the photo files from folders ../images/members/
    		 // Update the publish # to record the product as deleted
    		$q = "DELETE FROM product WHERE id_prod = {$row['id_prod']} AND publish <= 1";
    		$r = @mysqli_query ($dbc, $q);// or trigger_error("Query: $q\n<br />MySQL Error: " . mysqli_error($dbc));
    	} // end of loop
    	// When through redirect
    	header("Location: $home/member/index.php?user={$_SESSION['id_mem']}");
    	} // end if records for user
    	} // If someone clicks submit when no is checked
    		elseif ($_POST['sure'] == 'No') {
    		header("Location: $home/member/index.php?user=$user");
    } else { /* Show the form. */}

  4. Thanks for the reply.


    No I don't think that's it.


    I changed the css like you said the style doesn't change.  The time yes the style no, it works fine on my local host in ie, firefox & chrome but not online.


    I've also cleared the cache, history and eveything else in Firefox and it still doesn't work or change quickly after upload.


    It doesn't really bother me but I do want to know why it's doing this now and why it doesn't do it on my local machine.

  5. When I upload a php or html file the file displays immediately but when I upload a css file it takes 10 to 15 minutes to display.


    I've searched the web and can't seem to find an answer, this may be a server issue.


    After I upload a css file ...


    It doesn't display in ie, firefox or chrome for 10-15 minutes (it's different in this range each time I test)


    I try the regular refresh in ie, firefox or chrome and ctrl+f5 and it doesn't load the new css.


    Could it be something in my header? This just started with a new server I'm on(a cloud server) and I've had this same header for a while.


    Any ideas? Thanks

  6. There is also a bookmark mod, it places a link at the top call "bookmarks" click it and llinks to a file that has all the topics you've bookmarked.


    When you're reading a post it has button to mark it as a bookmark.


    I use notify here to keep tract of my favorite topics and it works but smf emails me everytime some one makes a post.


    It would be nice if IPB will have something similar.

  7. The display width does not constrain the range of values that can be stored in the column. Nor does it prevent values wider than the column display width from being displayed correctly.


    So this means I have to limit characters on input?

  8. I've searched for this and it seems it should work but it doesn't.


    As I under stand it, INT stores an integer in total up to 2 billion plus and if a length is assigned like int( 8 ) only 8 charcters of that length will be displayed.


    But my problem is if I put in more than 8 charactors they are all displayed, can someone tell me whats up?



  9. the only reason they are like that is because when they were in one file everytime i had to work on say... the footer, id have to scroll for 10 minutes until i got to where i wanted.


    I know what you mean, an old wordpress theme I had was like that and the css for this forum is probably like that. Close to 4k lines


    Study your css to see where you can cut out styles to eliminate duplicates. Also plug your site URL into these sites to get a heads up on your code. You can also direct input


    css: http://jigsaw.w3.org/css-validator

    html: http://validator.w3.org

    Website Optimization: http://www.websiteoptimization.com/services/analyze/

  10. The first thing a browser does is load each one of those files along with the header for those files first each time you load a page.

    I'd combine them and if possible use an if condition to include special css on certain pages.

  11. Yeah, I was attending a school in Pennsylvania for the past four years, now it is Cornell for me.


    Proud of you for going to Cornell, some friends of mine have kids in the Vet school. One of the kid's parents is a vet school grad and the other a Dairy school grad.

  12. Hall of Famer, are you in the states?


    That's interesting, my states main engineering school UF is just down the road, I wonder what they would say? My son doesn't go to UF but was probably talking about freshman because that was who was there mostly this summer. The Fall semester started this week.


    On a lark last night I looked at Apple laptops, they cost real money.

  13. I just looked at my google analytics and ie is 43% of my visitors, of those ie users 0.22% use ie6 and 9% of that 43% use ie7.

    Is that 9% of the 43% as in if you had 100 users, that's 9 users or if you had 100 users that'd be ~4 users?


    4 users, 9% of 43

  14. Thanks for the input! 9% is still a large number of people using ie7 ...


    IE's compatibility mode takes care of that. As a double check you can use a service like IE Tester to test for 6 & 7. As far as IE's compatibility mode goes it does not check for ie6.


    Also someone knows phpfeaks g.. analytics numbers, they do use it.

  15. Your line of thought makes no sense. You said he's going to school for football, and everyone uses Apples. Then you say geeks didn't like apples. Well football players don't tend to be geeks, so if you're going to make broad assumptions at least make them make sense.


    My son recently started school at a major university and he told me that almost every laptop you see, is an Apple, very few of the college kids students use a windows based machine.


    I took out the parentheses for you, does that make it easier?

  16. My son recently started school at a major university(in football not academics) and he told me that almost every laptop you see, is an Apple, very few of the college kids students use a windows based machine.


    Back twenty years ago the geeks made grunting noises every time someone said the name Apple.


    What's changed? Is this common?


    Also he might have been hitting me up for a new laptop and I just figured it out.

  17. I just looked at my google analytics and ie is 43% of my visitors, of those ie users 0.22% use ie6 and 9% of that 43% use ie7.


    Safari is 21% of the total and Firefox is 12% of total


    All I do now is use firefox and ie9 and ie's compatibility mode. Everyonce in a while I take a glance in Safari.



  18. I think businesses MAY be eligible for federal assistance if they live or own a business in a county declared a major disaster area by the President.



    I am sure there are many hoops to jump through.

    If it's a business expense, it's not even covered under his HOME owner's insurance. You need separate insurance for business property.


    It may be different now but years ago I had a cheap rider that allowed for 5-10k(somewhere around there) in business equipment at my house.


    I want to say 10k but that seems like alot for twenty plus years ago.


    Of course I bought a computer with 256k of ram, 20 mg running at 20 ghv for 3k, I thought I was the man.

  • 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.