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 dencom 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: bdichiara
  • Content: Threads
  • Order by date
  1. bdichiara

    Protect from SQL Injection

    I looked into this and it seems like this is the way to protect myself Dim sqlStatement As New Odbc.OdbcCommand("SELECT * FROM content LEFT JOIN categories ON content.category = categories.categoryid WHERE categories.cat_name = @category AND content.name = @page AND content.deleted <> '1' LIMIT...
  2. bdichiara

    Get totalRows and Row array with MySQL Database connection

    I'm using an ODBC Adapter with a MySQL Data connection to retrieve information from my database, and the example I was given doesn't quite explain how to get the data into an array as well as the total records retrieved. All I have is:Dim category As String = Request.QueryString("c") Dim page As...
  3. bdichiara

    URL Rewriting with RegExp

    I have tried and tried to understand how this works, and I cannot figure out for the life me 1: Regular Expressions and 2:How to format them for URL-Rewriting. I'm using some code I found online that does URL-rewriting but I don't know how to set up my rules. Here's an example: <rule...
  4. bdichiara

    How to construct a query

    I have 2 tables and I would like to run 1 query to pull data out of both tables. I guess it would be some sort of join. I have 1 table with a huge list of songs, all with a category associated with each song. I have another table that has a list of categories that the user wants to show up in...
  5. bdichiara

    Move records from 1 table to another And Including 1 field

    I've created a table called `temp` and I want to move all the rows in `temp` to `songs` based on: `temp`.`title` -> `songs`.`title` `temp`.`artist` -> `songs`.`artist` `temp`.`catalog` -> `songs`.`catalog` NOTHING -> `songs`.`userid` There is no field in the temp table that has this value, i...
  6. bdichiara

    FULL TEXT search with Partial Matching results

    I understand the idea behind "FULL TEXT" searching, however is it possible to get partial matching results with maybe a lower relevance. Here's one of my sample queries: (note: $like is my [cleaned up] PHP search term variable) SELECT *, MATCH(description,url,filename,plain_content) AGAINST...
  7. bdichiara

    Search Multiple tables with Relevance

    I am curious how relevance searching works. I have about 11 tables and I would like to make certain fields in those tables searchable, and the results displayed by relevance. I've thought about this many different ways to do this, but haven't come up with a way that seems the simplest as well...
  8. bdichiara

    Extract HTML attributes from String

    If i was presented with a string, for example: <tr id="rowId"><td align="left" style="background:#FF0000;">"say" Blah!</td> <td valign=bottom>S0m3's M0r3's $tuff?</td></tr> What would be the way of going about pulling out each thing in order to piece it back together for reason of creating a...
  9. bdichiara

    Slow / Too many requests

    I'm writing an AJAX/PHP chatting application (similar to liveperson) and I'm using the Script.aculo.us/Prototype Library for AJAX Functions. When the page loads, I initialize the chat. During the initialization, i startup 2 PeriodicUpdaters. 1. This one updates the "chat window" when new...
  10. bdichiara

    Dynamic Functions

    Is there a way to run a function dynamically. For instance: If I have a function: validatePage() and I also have a function: savePage() Is it possible to do something like: function doAction(action_type){ {action_type}+Page(); } Then I could do: onClick="doAction('validate');" which...
  11. bdichiara

    Optional &quot;.00&quot; in Decimal Field

    I need the sort features of a DECIMAL Field, but the functionality of a VARCHAR field. I want a field in my table to hold values such as: 50 100 5 15.25 25.80 90.11 8 17 30.65 I don't want the database to automatically add the ".00" to the end of the values that don't have it. How can I...
  12. bdichiara

    MySQL Decimal Field Predicament

    I have a decimal field set to 50,2 in my table. The problem is this field can hold numbers without decimals, for example: 20.20 30.59 5 14 35.70 In my PHP code, i check to see if it has a decimal, and that's how I know that it's money, so I add number_format() to the value. My problem is when...
  13. bdichiara

    validate file upload

    I'm looking for a simple way to check to see if a file input field has a value. I have an upload field, however, if they choose to put something in that field, it will replace the existing item in the database. This is what I want, however, if they leave it blank, it erases the existing item in...
  14. bdichiara

    Using Document Merge and Index

    Is it possible to create an index and use document merge. I'm using 8 INDD documents along with 6 CSV files to create a book and I need to index the data brought in from the CSV sources in the back of my book. Is this possible and if so, how? Thanks! _______________ _brian.
  15. bdichiara

    Extracting Text from a PDF

    I found a function on PHP.net that allows extraction of text in a PDF, however it returns a whole mess of strange characters, copyrights about fonts, verisign, microsoft,Arial fonts, etc. Here's the function:function pdf2string($sourcefile) { $fp = fopen($sourcefile, 'rb'); $content =...
  16. bdichiara

    Select * with Distinct on Some

    How can I select all fields in a table, but only want distinctive records based on 2 or 3 fields? Like: I want to display: all fields, but distinct on f_name, l_name, and extension _______________ _brian.
  17. bdichiara

    table data restructure

    I'm going to restructure some of the data in my database to run smoother. Currently, I have many rows in my database in with a field called "location" in this format: link[234] or kb[76] or search[something in something] basically, I guess i need 3 separate update queries that will get rid...
  18. bdichiara

    Using CONCAT for 2 tables

    Currently I'm using this SQL query to connect 2 tables but now, I need to add a 3rd table in the same manner as the "links" table in the following query. SELECT * FROM tracker LEFT JOIN links ON tracker.location = CONCAT('link[', links.linkid, ']') ORDER BY tracker.occurred DESC LIMIT 0, 15 My...
  19. bdichiara

    Multiple Joins, not sure how

    Here's the deal. I'm modifying a WordPress theme to suit my needs and i'm struggling with the way WP has setup their database. I'm trying to setup a Query that will match a Post with it's Category ID, then match the category id with the category name. I need some sort of INNER or LEFT join in...
  20. bdichiara

    Link to network drive?

    I'm working on an intranet site and I was curious if there is a cross-browser way to link to a network drive? Right now, I'm using: <a href="\\servername\folder">Network Drive</a> however this only works in IE. Is there a different way to do this? _______________ _brian.

Part and Inventory Search

Back
Top