Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: dcnguyen
  • Content: Threads
  • Order by date
  1. dcnguyen

    Form options, selected and checked, won't validate as XHTML

    I'm using "selected" and "CHECKED" to pick the default choices among radio buttons and drop-down select menus. However, they don't appear to validate as XHTML 1.0 Transitional: # Error Line 131 column 19: "CHECKED" is not a member of a group specified for any attribute. <input CHECKED...
  2. dcnguyen

    How to display wrongly-formatted XML?

    I've got an ajax call that reads a xml response as such: var xmlDoc = request.responseXML; var responseNode = xmlDoc.documentElement; foo(responseNode); What would I test to see if responseNode was properly formatted XML? Sometimes, the php script will echo an error that's not xml...
  3. dcnguyen

    Regexp question...replacing a url variable

    Let's say I have a url like: http://www.site.com?apple=12&orange=342&pears=12 What would be the regexp to replace the 'orange' variable, which will always be numeric? I can figure it easy enough for the top case, but in the case of the url being: http://www.site.com?apple=12&orange=342
  4. dcnguyen

    Doh...what's wrong with this update using 2 tables query?

    I thought this was the correct syntax, but everytime I run it, it crashes the database: UPDATE table1, table2 SET table1.X = table2.x_coord AND table1.Y=table2.y_coord WHERE table1.address = table2.address It's dealing with a table with about 1000 entries in one, and 100,000 in the other.
  5. dcnguyen

    Speed comparison between entering entries by PHP and using another tbl

    Was just wondering...Let's say I have a table with 100,000 address entries associated with other info, such as resident names, and I have a text file with the lat/long coordinates for those addresses. So I want to put that lat/long data into the address table. Is it faster to create a table...
  6. dcnguyen

    How to remove linebreaks from a csv file?

    I converted a database to csv format and found out that some of the textfields have irregular line breaks. For example, the ideal format would be: "Apple", "10", "There were ten apples in the orchard" What some of the entries end up being are: "Apple", "10", "There are ten apples in the...
  7. dcnguyen

    Best way to do an author-book database?

    I'm familiar with terms like many-to-many but am no expert...What I'd like to do is create an authors table and a books table, with a key connecting the two. The problem, as I see it, is that a book can have many authors, and an author can have many books. What's the best way to structure the...
  8. dcnguyen

    Agh...getting error when referring to two tables

    OK, I thought updating a table based on values from another would be as easy as this: UPDATE table1 SET table1.apples = table2.apples WHERE table1.oranges = table2.oranges Those columns definitely exist. But I keep getting this error: #1054 - Unknown column 'table2.oranges' in 'where clause'...
  9. dcnguyen

    Can't get key name in multidimensional array

    I have an array like this: Array ( [School Name Here ] => Array ( [status] => private [Girl's Basketball] => Array ( [wins] => 16 [losses] => 10 ) [Baseball] => Array...
  10. dcnguyen

    How to select childnodes by name?

    Is there a built-in JS function to select a childnode by name? For example: <book> <authors> <author> <author> </authors> <price> </price> </book> How would I go about selecting the price node?
  11. dcnguyen

    How to do a &quot;there were x results, this is first y&quot; result in 1 query?

    Let's say I have a database of book entries and I want to only retrieve the first 50 that have a certain author, even though there are more than 200 of them. What I'd like to output is a message saying, "Your search found 2xx results. Here are the first 50" Is there a way to do this in one...
  12. dcnguyen

    Need help with str_to_date function

    Here's my problem...I have a database full of dates that were entered in this format: 1/1/2005 0:00:00 This field is currently in varchar...how would I go about changing these dates to the proper format using str_to_date? I understand how that function works, but unfortunately, my mysql...
  13. dcnguyen

    Tabbed interface: can't get rid of bottom border

    Gah...been racking my head on this. I want to make a CSS/Javascript tabbed interface similar to this: http://sunshine.rahul.net/~unicorn/menutest.html Or what you would find on Google's personalized homepage. My hangup is how do I go about making the bottom border of the active tab go away...
  14. dcnguyen

    How do I shut off an infinite php script ?

    I'm ran a PHP script on my hosted server that updates some values in a mysql table. After I ran it, I noticed, oops, it will run forever, and it's not a particularly intensive one either (I put in a usleep to slow it down). I'm pretty sure the script is still going, because even after I delete...
  15. dcnguyen

    How do I pass GET data without using a form?

    OK, on my form.html page, I have a field where someone can type in an address. My intent is to geocode this address and pass the address, latitude, and logitude to the php page...unfortunately, all I know how to do is pass variables using form/submit.
  16. dcnguyen

    Painfully basic regexp question

    After reading through a few tutorials, I'm convinced I have a mental block when it comes to regexps. All I'm trying to do is find out if a string contains the characters %,$,!,@,<,> How would I do this? According to some guides I read, special characters in brackets (with the exception of a...
  17. dcnguyen

    Sorting a multidimensional associative array

    Argh...I swear I've read about 20 articles on usort, but can't find the answer to what must be a common dilemma: I have an array that is formatted as such: Array ( [0] => Array ( [title] => Dog [2000] => 278 [2007] => 50 )...
  18. dcnguyen

    IE7 penetration?

    I've been in Mac/Firefox land for the past couple of months...are there any numbers on what percent of computers have now migrated to IE7? I've some friends who have switched over without realizing it, so I'm assuming that most IE6 computers have converted?
  19. dcnguyen

    How to refer to css class that has spaces in it?

    My CMS is generating div classes such as: <div class='view-field view-data-image-nid'> How do I refer to that class in the css? Doing ".view-field view-data-image-nid" doesn't seem to work...
  20. dcnguyen

    How do I print out script tags and javascript?

    OK, I'm creating a page that, upon some input and a button click, prints out some Javascript (including script tags) for people with even less JS knowledge than myself to copy and paste... So basic question..How do I print this out on the webpage using a, for example...

Part and Inventory Search

Back
Top