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 Mike Lewis 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
  • 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?

    As it turns out, it just took an extreme amount of time...What would the problem be? Is it because in both tables, there are addresses that appear more than once?
  5. 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.
  6. dcnguyen

    Speed comparison between entering entries by PHP and using another tbl

    OK, one table is something like this: address/date/description The other table is address/lat/long There are hundreds of thousands of entries...I've been playing around with geocoders and I've only found one interface that does batch geocoding with the geocoordinate database that I...
  7. dcnguyen

    Speed comparison between entering entries by PHP and using another tbl

    I meant as from a performance aspect...I only know how to work with MYSQL and PHP, not the tech specs behind them...It seems more convenient to do it with a PHP script, the way I have things set up, but I figured mysql just had inherent advantages when combining data between two tables.
  8. 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...
  9. dcnguyen

    How to remove linebreaks from a csv file?

    Thanks all, for the help. I used a combination of the two...using fgetcsv to split the fields properly, then using str_replace to weed out the linebreaks in the affected field. I found that I had to delimit my file differently...that is, I used pipes to delimit, and ^ to set off text...
  10. 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...
  11. 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...
  12. dcnguyen

    Agh...getting error when referring to two tables

    oohhhhh...ok, I was wondering about the error message I got. I just gave up. Thanks for the help all.
  13. dcnguyen

    Agh...getting error when referring to two tables

    Thanks...that took out the error message, but it returns 0 rows as affected, even though I know for sure there are matching entries.
  14. 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'...
  15. dcnguyen

    Can't get key name in multidimensional array

    Thanks. As I thought...I didn't understand foreach completely...I thought $key (as you used it) was also an array. Doh.
  16. 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...
  17. dcnguyen

    How to select childnodes by name?

    Oops, nevermind...The function works, I was calling it as a member function from something that wasn't a node...Thanks for the help.
  18. dcnguyen

    How to select childnodes by name?

    Yeah that's what I thought, but I get a "Object doesn't support this property or method
  19. 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?
  20. 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...

Part and Inventory Search

Back
Top