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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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.
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 =...
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.
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...
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...
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...
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.