Jump to content

ober

Staff Alumni
  • Posts

    5,327
  • Joined

  • Last visited

Posts posted by ober

  1. Oh... well I wasn't clear on the intent.  You can still get totals within one query.  You should be able to use a combination of DISTINCT, COUNT and GROUP BY to get what you need.  I'd suggest posting in the database boards to get that information.

  2. From your query you posted it looks like all you need to query the DB for a user is their phone extension, right?  If so, I'd create a text file with the following (just a list of extension numbers):

     

    1234

    1343

    2345

     

    Then:

    $exts = file('/home/user/phones.txt');
    foreach ($exts as $num => $ext) {
        $query = "SELECT * FROM table WHERE ext = $ext";
        // do whatever else needs to be done here
    }

     

    Or if you want to just do one query where you grab all of the records at once:

     

    $exts = file('/home/user/phones.txt');
    $str .= "SELECT * FROM table WHERE ext IN (".implode(",",$exts.)")";
        // do whatever else needs to be done here
    }

     

    Does that help?

  3. Ick.  The graphics are poorly done, the layout is weak at best, and there are some glaring annoyances all over it.

     

    1) "X should not be null" is a bad way to phrase an error message on a social networking site (signup page).

    2) The logo is uninspiring and doesn't match the background color of the header area.

    3) You're using a mailto link for suggestions.  Who still uses mailto links??

    4) I'm in the help section... but how do I get to anything else?  The navigation is at the bottom... BAD IDEA.

     

    I'll stop there.  Overall it's a 3/10.

  4. For the users list, you could simply create a text file that you edit.  Search the board on handling files or look at the manual under http://us.php.net/manual/en/function.file.php.  That should get you started.

     

    Then you just feed the extension into the query as a variable in a loop.  file() will split the contents of the file into an array already so you can just use foreach() or a while() loop to run through the array.

     

    As far as sorting by column, simply pass a variable to the query and use an "ORDER BY" clause (this works in any DB).

  5. You now, if we had such a thing in the market..... We wouldn't be here right now having this discussion. Infact, I would hack google, ebay, paypal, and phpfreaks.

    Umm... yeah... none of those sites, except for us, are using PHP.  Trust me on that.

  6. That's about enough.  Fenway was simply stating that if you're so eager to hand over your details, you probably didn't build it yourself.  It's a fair enough statement without knowing more about you.

     

    Attacking a global mod and using language to stoop to an even lower level will get you nowhere around here.

  7. 6/10

     

    1) Too many colors.  Lose the green or lose the purple.

    2) The background image repeats horribly.  Find something different, and maybe don't let it repeat.

    3) The header graphic is grainy and very poorly done.  www.sxc.hu (find a better background)

    4) Padding is your friend... use it in the content area.  Text should not bump into the graphics that flow in the content.

    5) The text changes too much... bold, large, italic, small... it's all over the place.  Tone it down.

    6) If you're going to have something without flowing text around it (videos on a few of the pages), then center the video.

     

  8. You need to surround all of those inputs with single quotes... they're all strings. The only time you can leave off the single quotes is if the value is strictly an integer or a float.

     

    Also, always use " or die (mysql_error()). That will be much more descriptive.

     

    mysql_query("INSERT INTO intowar1 (ipaddress, thedate, name, thename) VALUES('$ipaddress', '$thedate','" . mysql_real_escape_string($_GET['name']) . "', '$thetime')") or die('Theres an error. Please try again.#'); 

  9. http://us2.php.net/asort

     

    Set the indexes of your array to the file name, then sort the array using the above function.  Since your array values are simply integers, the biggest number will be the most recent file changed.  Once it's sorted, I believe your last array element should be most recently modified file (and just grab the key of that one to get the file name).

  10. Your checkboxes should all be named the same: "box1234" or something similar.  When you submit the form, you search for anything in the $_POST array that begins with "box" (use substr) and get the number portion after it.  The number portion would be the ID of the ad in your database.  Then you simply build a query out of the string of IDs you just gathered and throw that in a new query: "SELECT X, Y, Z FROM table WHERE ad_id IN ($string_of_ids)".

  11. I give it a 5/10.

     

    1) Some of the icons are very fuzzy.

    2) You have a "show links" tab or something once the user logs in that looks AWFUL.

    3) It doesn't play well at smaller resolutions (even 1024x768).

    4) There are places where you have boxes side by side and they're different sizes.

     

    It just doesn't look polished.

  12. PHP does not affect the browser.  This is something running on the client on your friend's computer that is doing it (browser plugin or 3rd party configuration).  I would look at your client-side scripting (any flash/JS, etc. that you're using).

  13. The design is awful... there's really no point in reviewing it.  Start over.

     

    And what's the point with that small of space/bandwidth.  There are many free hosting accounts you can get that give you more than that!

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