Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
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.
-
So, you'd hack it. OP, set both tables to float: left and use a br or div with clear:both after them.
-
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.
-
Yes, it's possible. Did you try it?
-
Dude. Get a new email address. This is the teens, we throw stuff away when it breaks
-
How would you get two block elements to appear side by side without float?
-
<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.
-
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.
-
Dude, read what you wrote...
-
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)
-
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.
-
Do you know what an array is?
-
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.
-
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.
-
I very much agree, great point.
-
complete, verbose, whichever
-
Again, cause I am a ninja! Or just need more stuff to do. *wanders off*
-
So, clearly $_SESSION['cart'] is not an array. The first few lines in your add case might be the problem.
-
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>'; } ?>
-
Don't do the query inside the loop!
-
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
-
You can use PHP to generate a css file dynamically.