Jump to content

The Little Guy

Members
  • Posts

    6,675
  • Joined

  • Last visited

Everything posted by The Little Guy

  1. Yes I did, and I still get the same message.
  2. this is a small bug I think I may have found.... When I run this query: create table words (word_id int unsigned primary key auto_increment, word char(32)); it errors out saying that the table doesn't exist. I then try this (changing "words" to "wrds"): create table wrds (word_id int unsigned primary key auto_increment, word char(32)); it creates the table just fine Next I run this: rename table wrds to words; It renames the table just fine. So is it a bug that it couldn't create the table words but it can rename a table to words? MySQL Version: 5.5.20-log
  3. is there a way to replace all <? with <?php and leave all <?php alone? I am using javascript, but it is still regexp, so I thought I would post in the regexp section. I came up with this: code = code.replace(/\<\?[^php]/g, "<?php\n"); but it removes the first letter after php the beginning of the string: <?namespace becomes: <?php amespace as you can see the "n" is missing...
  4. no, I would add a unique key on both the columns like this: create unique index on cat_items (Category_ID, Item_ID);
  5. usually you would have 3 tables for this: categories: Category_ID (PK) | Category_Name | Category_Position | Category_Visibility cat_items Category_ID | Item_ID items: Item_ID (PK) | Item_Name | Item_Description | Item_Price | Item_Stocks | Item_Sale | Date_Added you would then put your Category/Item pairs in the two column table. then do a query like so: select * from cat_items ci left join categories c using(Category_ID) left join items i using(Item_ID) where ci.Category_ID = 123
  6. I searched a hacking forum, and found this link: http://www.apdec.org.za/news.php?branch=2'&article=58' Could this be what is causing your problem? when you query is expecting numbers, force the value to a number like this: $branch_id = (int)$_GET['branch']; $query = "select * from branches where branch_id = $branch_id";
  7. A. Why are you suppressing errors during testing? B. Why do you perform the query 2 times? Other: You should preset $CustomerID to 0, because if no rows are found $CustomerID will not equal 0 and it will set the session.
  8. Noobs don't like thorough, they like real world examples, and the documentation as a reference. In that case I recommend http://tizag.com
  9. pass $connection as the first parameter: mysql_affected_rows($connection)
  10. Yeah, because the world needs more overwhelming gradients and glassy buttons. That isn't what Web 2.0 is. You obviously didn't read my link marked (A good one).
  11. make the page simpler (KISS), there is too much going on, Kind of like these: https://mysocialcloud.com/ https://www.dropbox.com/ http://getcloudapp.com/ Lighten the page up dark colors scare people, unless it is a photo site, design site, creative site, etc. Learn Web 2.0 http://www.smashingmagazine.com/2007/03/10/web-20-tutorials-round-up/ (A good one) http://www.webdesignfromscratch.com/web-design/web-2-0-design-style-guide/ https://www.google.com/search?q=web+2.0+tutorials
  12. I would suggest maybe take money out of your own pocket to get the ball rolling, something such as: - An Amazon Gift Card - A Year Long Magazine Subscription - Cash Start small, once more and more members start using your service, start getting ads (preferably BuySellAds.com) on the site to help pay for the prizes, and soon ads will be paying for your prizes and left overs will be income for you or website maintenance. I would think most companies wouldn't want to give you things for free unless it is going to benefit them (like said above).
  13. I would recommend using the primary key column name instead of * that is usually faster.
  14. Only half the home page shows up for me. - The colors don't go well with the blue - The header logo is ugly get a real logo - "prefinished solids" and "engineered woods" pages are too long, paginate - When a nav item is being displayed, highlight the nav item - All your footers are only displayed half way across the page - Marquee only shows up on some pages (I'd get rid of it, its no longer the 90's). Don't you create a file that has all the header html, and just include that? - Too many colors: pink links, gray links, brown links, red links, white links, blue location menu, brown location hover Those are a few tweaks that I see.
  15. here is a mysql database: http://www.populardata.com/downloads.html after you import that, you can use it to search.
  16. I have charged $100 for a form much like the one on this page: http://www.montway.com/
  17. this worked: tr:hover > td{background-color: #f1f1f1;}
  18. I have a table that looks like so: <table> <tr> <th>Header</th> <th>Header</th> <th>Header</th> </tr> <tr> <td>Item</td> <td>Item</td> <td>Item</td> </tr> </table> How can I apply a hover effect to a "tr" element ONLY if it has a "td" child element?
  19. Found it! I had a return that was exiting the execution of the second method in another unrelated method! foreach($this->listeners as $hook){ if(method_exists($this->$hook, $method)){ return call_user_func(array($this->$hook, $method)); } }
  20. Yeah the . is in there, I copied and pasted the method directly from the code. There has got to be something else going on then... I don't even know where to start with debugging I have already gone through the page load process like 5 times, and I am not seeing it. When It is run on my site, the first classes data gets loaded into the variable but not any of the ones after it for some reason. I echoed some text right after I called Template::append() and they were both echoed out, so I know each function is being called. But why is the second one not getting put into the array?!?!
  21. Am I missing something? Whenever I try to append data to the end of a string from an array, it doesn't get put there. Class Template{ public static $items = array(); static public function append($key, $data){ if(!isset(self::$items[$key])){ self::$items[$key] = ""; } self::$items[$key] .= $data; } } Example: class ClassA{ public function __construct(){ Template::append("CONTENT", "This is ClassA"); } } class ClassB{ public function __construct(){ Template::append("CONTENT", "This is ClassB"); } } $classA = new ClassA(); $classB = new ClassB(); print_r(Template::$items); When I do a print_r, the only thing in $items is This is ClassA What isn't This is ClassB in there?
  22. Why would it be? It's something you want people to configure using an easy UI tool? Not a one-time thing? Yes, it is a UI tool for my CMS, in case someone changes the name of the db, username, password, host, etc. and they don't know php they can easily do it via this instead of finding the file and trying to figure it out.
×
×
  • 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.