sql query

Category: Database Questions    |    2 views    |    Add a Comment
I am using mysql and I have a table called "users". how will i get it to show only rows that have duplicate emails in the "email" field. I want the emails in order. what sql query will I use?

Share/Save/Bookmark

 

Required field validation

Category: AJAX Questions    |    0 views    |    Add a Comment
I have an html form with multiple fields. Some of the fields are required, others are not. I have a JavaScript validation form that will send an alert if a field is empty. However, I only want it to send an alert if a required field is empty. How do I signify which fields in the form should cause the alert message to pop up?

Thanks,

Tom Tolleson

Share/Save/Bookmark

 

how to use escape and unescape

Category: AJAX Questions    |    0 views    |    Add a Comment
<input type=text class=text_box2 name=lstMAName"+s+" onchange=showMAName(escape(this.value),"+s+") id=select2>

in the above code iam sending the selected value to the ajax function showMAName(str,str1) in select.js
but there iam not getting the full value of this.value ( means if any space in the string like "how r u", iam getting only "how")
i here that the solution is escape and unescape but i use like in above code but not working
can u plz tell me

thanqs

Share/Save/Bookmark

 

Best way to query

Category: Database Questions    |    1 views    |    Add a Comment
Would anybody happen to know which of these ways is the better way to run your queries??

Would it be better to have all your SELECT queries before the actual <html> code starts, or would it be just fine throughout the page in the <body> tags?? Is one slower than another or maybe smoother than another?? Also, is having multiple queries slower than combining them into one query, or doesn’t that really make a difference??

I have about 15 tables on one page that each runs its own query right now.. I have placed the query code within each table to extract the data needed for that specific table.. Im only asking because it just seems as if the page is loading and running a bit slower than without the queries.. Is this just normal for multiple queries to do this??

Thanks to all who reply!!

Share/Save/Bookmark