Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. You said "Why not put a MySQL LIMIT on the first table and then another LIMIT on the second? You will also need to put both tables in 1 separate table." You do know that MySQL is not the only database there is right? I would love to see how you use sqlsrv_fetch_array to get rows from a MySQL database. I think you're confusing a database table with an html table. This question has NOTHING to do with LIMIT or their queries, and everything to do with positioning two HTML elements. If the OP comes back and says the problem was too many results, your response might have some merit. But as it is, this question is pertaining to positioning two HTML tables, not getting the results out of the database table. Nesting tables is a bad practice. Tables are for tabular data. CSS is for positioning. EOM.
  2. So, you'd hack it. OP, set both tables to float: left and use a br or div with clear:both after them.
  3. Your new response makes even less sense, especially since I'm pretty sure the OP isn't using MySQL, and this is a topic about html/css not sql.
  4. Yes, it's possible. Did you try it?
  5. Dude. Get a new email address. This is the teens, we throw stuff away when it breaks
  6. How would you get two block elements to appear side by side without float?
  7. <a href="?php echo (isset(S2MEMBER_CURRENT_USER_LOGIN) ? S2MEMBER_CURRENT_USER_LOGIN : 'home_page_url');?>/">Client Area</a> You might need to also check the string length of the login. Also, you have it set as a constant in some of your examples, and a variable in others, so figure out which it is.
  8. I think you don't understand what xyph wrote. I had never read it, I don't know xyph, and that is not at all the vibe I get from his posts regarding this topic. He hasn't called anyone an idiot, or made out that he's smarter than anyone else here. And when he asked you to back up your claims, you haven't, instead resorting to playing the victim in some imaginary attack.
  9. You'll have to play around with it, but you could probably put a wrapper around them with margin: 0 auto;
  10. I personally would do the entire rules in a tooltip/small text, and then for the error specify which they broke. IE: Username: (box here) Username must be 8-30 characters and contain only A-Za-z0-9. (this is small text under it) Then when they mess up Username: (box here) *Username must be at least 8 characters * (bold/red) Username must be 8-30 characters and contain only A-Za-z0-9. (this is small text under it)
  11. Okay so see how cart = 1? That's not an array. An array would be like [cart] => Array ( [qty] => 1 [id] => 7) We already told you where the problem is, and another person even posted the section of code that is the problem.
  12. Do you know what an array is?
  13. Well, stop using dreamweaver is my next tip. If this is a class project why doesn't your professor know how to handle the problem?
  14. I agree with your last point, which is why I use strlen for the first two, then two separate checks for the last ones. You shouldn't require a username to have a number though, that's just cruel.
  15. the way the person responded is worded awkwardly, the first parameter contains 1 thing and another thing? I think he means two parameters? I would try $client->GetQuotes('{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}', 5); to get 5 quotes, assuming you replaced {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} with an appropriate ID.
  16. Aren't sessions and cookies on the domain, not the folder? If you renamed the session variable, then there's no way that their code which is looking for MM_Username would accept your name which is NOT MM_Username.
  17. I very much agree, great point.
  18. complete, verbose, whichever
  19. Again, cause I am a ninja! Or just need more stuff to do. *wanders off*
  20. So, clearly $_SESSION['cart'] is not an array. The first few lines in your add case might be the problem.
  21. You can either do two queries (not in a loop, but two separate single queries) to get the list of companies and the list of all images sorted by country, OR you can do this (which is how I'd do it) In the join the ON needs to represent the relationship between company and comp_images. There should be a unique ID for each company. <?php $sql = mysql_query("SELECT comp_images.*, company.* FROM comp_images LEFT JOIN company ON company.id = comp_images.company_id ORDER BY company.name"); $last_company_id = 0; while($comp = mysql_fetch_assoc($sql)) { if($comp['id'] != $last_company_id){ echo "company name: $comp['name'] <br>"; $last_company_id = $comp['id']; } echo $comp['image_info_here'].'<br>'; } ?>
  22. Don't do the query inside the loop!
  23. You should be doing a join, not queries in a loop. Example: SELECT comp_images.*, company.* FROM comp_images LEFT JOIN company ON company.company_id = comp_images.company_id
  24. You can use PHP to generate a css file dynamically.
×
×
  • 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.