Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Invoice Search: Searching For Rec Where 2 Diffrent Services Happened That Same Day


I have a invoice table that has services and dates along with stuff like customer, record number and others. Many services can be completed for one date.

I am trying to pull records for when service '111' was completed, but only if service '222' was completed that same day.




View Complete Forum Thread with Replies

Related Forum Messages:
Selecing Max And The Time It Happened
mysql> select max(mysql_outdoor), timelog from unit_data where unit_id = 4 and timelog >'2008-06-03' and timelog < '2008-06-04' group by unit_id;
+-------------------+---------------------+
| max(mysql_outdoor) | timelog |
+-------------------+---------------------+
| 68.6 | 2008-06-03 00:00:18 |
+-------------------+---------------------+
1 row in set (0.60 sec)

View Replies !
MYSQL Fulltext Search - Searching For 3 Character Words
I have fulltext search in my table. The default number of words it can search is 4.
I have requested our hosting support to reduce it to 3. They said it is not possible.

I am looking for ways to search for 3 character words also.

So, I am first checking if the string length of keywords to be searched is greater than 3.
If it is greater than 3, I am searching using mysql fulltext search.

and if it is 3, I am searching like this:
title LIKE '%".$keywords."%' OR descriptions LIKE '%".$keywords."%'

This works well if the keyword is a single word with 3 characters.
If it is a keyphrase, it is not working because string length is greater than 3.
example: 'psp downloads', 'wii downloads' etc..

Is there any better method to search for 3 character words in the search terms?

View Replies !
Invoice Per Customer
I have two tables that I need to query. One contains customer data, the other contains customer invoices. They are linked by a idn field, simple setup.
The situation is such that I have many invoices for 1 customer. I would like to create a query that gives me the customer record and the most recent invoice information.
What is the best approach for this. The joins I had tried all result in a record returning for each invoice. Thus I get all the invoices returned and cutomer data for each, I would just like to get all of the customers and the most recent invoice data.

View Replies !
Invoice With Date Range
Am I able to allow user to choose to list the invoice from selected date to selected date as a date range by using mysql? How?

View Replies !
Select Sum Of Two Diffrent Queries
I want to have the sum value of two diffrent queries.

Example:
First query = SELECT 1 + 1;
Second query = SELECT 2 + 2;

The result should be 6;

How can i do this with SINGLE query?

View Replies !
Preceding Zeroes On Invoice
I want my invoice numbers to look like this:

000013546

NOT:

13546

any way of formatting the result?

View Replies !
Handle Diffrent Types Of Currency
I am using mysql version 5.0 and i want to handle diffrent types of currency so tell me if there is some data type to handle different type of currency data.

View Replies !
Link Two Mysql Databases On Two Diffrent Servers
I have 2 different MYSQL databases on two different servers.I want to link the two databases.Is there any mechanism for this like we have database link in oracle.

View Replies !
Mysql Services
How do you install multiple mysql servers as windows services

View Replies !
Data Transfer Services
Does anyone did DTS using MYSQL before?
thinking to migrate from MSSQL to MYSQL.. If MYSQL can do DTS, then I don't need to do scripting to transfer data.

View Replies !
Mysql Services Windows 2003
------=_NextPart_000_0001_01C34BC2.26B3C4C0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Why can't I start the service in windows 2003 server have any one a solution?

View Replies !
Wrong Path In Component Services
I am running Win 2000. I need to change the MySql excutable path in
Component Services. When Iright click on Properties the path is wrong but
can't change it from there.

View Replies !
Windows SQL Services And Removing MySQL
I had installed mySQL when a programmer wanted to use it for a project. Then i uninstalled it. Now the MS SQL services (SQLserver, sql server activation directory helper, sql server browser, and sql server vss writer), cannot be started. The error messages seem to indicate that there are some files missing in order to run the services. I tried to re-install MySQL, but not it is giving me error zero when i run the configurator.

View Replies !
Remote Conn Via ODBC Or Web Services?
I need your help, I've developed an application succesfully using PHP and MySQL

But in order to mantain the MySQL database I need to make constant connections from either Progress or Delphi

It's been working just fine using the MySQL ODBC 3.51 connector, but only in the SAME machine (localhost) any other machine atmysqlting to connect remotely gets an error

This implementation works if my customer has a dedicated server posted on the web, but other customers need to hire external hostings

In that case, how can I connect progress or delphi to a REMOTE MySQL DB on a external SERVER?

View Replies !
Reporting Services Equivelant In MySQL Or PostGreSQL?
Does anyone know a product equivelant to MS SQL Server Reporting Services, but for MySQL or PostGreSQL?

View Replies !
Mysql Stock In Services Forgot To Remove
i have uninstalled mysql to put it on a different drive soon
The old mysql stayd in Services and I dunno how to remove it from administrative services?

Mysql is not installed atm i will install it soon
in other words how do I remove from administartive services once i uninstall the whole thing.

View Replies !
Performance Of Win2K Server After Starting The Apache 1.3 Services
After starting the Apache 1.3 serivce the Win2k server performance is slow , as equal to hang position.

we are having 4 GB RAM .

what could be the possbile reason for this cause.

View Replies !
Fulltext Search Along With Surrounding Text Like Search Engines
Is it possible to get some text surrounding the match in a fulltext search?

Like, if the text was "Lorem ipsum dolor sit amet" and the search was "ipsum", I would like to retrieve "Lorem ipsum dolor". A bad example maybe, but in a nutshell I want to get a short description for my search results

View Replies !
Search: Remove Quotes From Database For Search
I am making a book site and currently in the database are book titles likes "John's Trip" and "Peter's new bike". I have a search function where the customer can type in "Peter's" and it will bring up everything with "Peter's" in it.

But i was wonderind is there any way i can search for "Peters" and "Johns".

View Replies !
Fulltext Search Doesn't Search '&'
Given a search string of 'NA&SD' my default Fulltext search doesn't find it. Wondered why? Is there a fix?

View Replies !
Fulltext Search Search Blob?
Does the fulltext search is a good way to find words in a table which contains more than 500'000 rows, moreover it will search in blob field.

What's your opinion about fulltext in big table ?

View Replies !
How To Search Other Tables In Search Query
I've got a search query for my website that I'm having problems with. Basically I can't get it to search the fields "summ_towns.town_name", "summ_states.state_name", "summ_countries.country_name" because they're not in the same table I can't include them in my MATCH/AGAINST query.

What I'd like to do is search against a town, then state, then country before getting to the MATCH/AGAINST clause. I've tried including OR operators to do this, but it always mucks up the AND clauses above.

Would someone be able to show me how I can do this without confusing the different operators?

View Replies !
Searching A Row
i need to be able to do a search using the "LIKE" instance through all of them, but id was hoping to avoid having to do something like this:

first_name LIKE "%$form{'FirstName'}%",
last_name LIKE "%$form{'LastName'}%",
company LIKE "%$form{'CompanyName'}%",
street1 LIKE "%$form{'Street1'}%",
street2 LIKE "%$form{'Street2'}%",
etc....
i would have to do this like 40 times to have it search everything.

View Replies !
Searching On ý
I need to find all the instances of ý in my database, but not y. So, for example:

SELECT * FROM listings WHERE descritpion LIKE '%ý%'

produces anything with a y in it. How can I get only those records with a ý?

View Replies !
Help With Searching WHERE/LIKE/OR
I tried to search this on the forum, but 'where', 'like', and 'or' aren't the greatest of search terms...

Given a keyword, I need to search several fields for matches. I can use %$keyword% format.

This is what I have been trial and erroring:

$query = "SELECT * FROM tablename
WHERE field1 LIKE '%$keyword%'
OR field2 LIKE '%$keyword%'
OR field3 LIKE '%$keyword%'";

Can you see the error here?

View Replies !
Searching For Records
eg search for records having same email address

select txtemail,count(txtemail) from `tbl_user` GROUP BY txtemail
having COUNT(txtemail)>1;

and it works, is that the best way?

View Replies !
Searching Mysql.com
A comment was made something to the effect
that such a line in /etc/mysql/my.cnf could be
used to restrict network connections to mysql
to a specified IP address. I'm not quoting exactly,
but the idea is that if it is desired to connect to
mysql tables via say an ODBC connection, a line
like bind-address = 192.168.1.175 would allow
connections from a client pc with that ip addr.

What if I wanted to allow 2 PC's on the LAN to
connect to the mysql server on the linux box?
I couldn't find help on mysql.com for this objective.

View Replies !
Searching By Tags
I have three tables: `photos`, `tags` and `tags_photos`.

The `photos` table contains a unique ID and a bunch of other stuff, the
`tags` table contains a unique ID and a tag name, and the `tags_photos`
contains the photo ID and the tag ID for an association between a tag
and a photo.

In other words, any photo may have many tags and any tag may have many
photos.

This is great for filtering photos based on tag, but I'm now trying to
allow users to search photos on multiple tags. I want users to be able
to enter a list of tags and either search for photos with "all these
tags" or "any of these tags".

I tried the query "SELECT a.* FROM photos AS a, tags_photos AS b WHERE
b.photo=a.id AND b.tag IN ($tags)" where $tags is a comma-separated
list of the tag IDs from the tag names the user entered, but of course
it returns photos multiple times if they have more than one of the
entered tags.

Any ideas?

View Replies !
Searching Algorithm
I'm developing a database for a research firm which has data they want
to search for specific criteria against varying base line data - some
of the questions that have been asked to get the raw data (which I
will import into MySQL) are like this:

how often do you use mouthwash?
etc.
etc.

The responses for each question was structured with only 4 answers
from a large group of people:
no answer
low
medium
high

Using various baselines of people, I want to build a query that will
accurately find matches and to also allow me to find 'close' matches
- for example:

if base line #1 is for a consumer who uses mouthwash a 'medium' amount
of times per week, I want to find in the database how many 'hits'
there are for that question - but I also want to capture 'close' hits
like in this example, for this specific question, if the search finds
'low' instead of 'medium' I'd like to count that as a 'close' hit vs a
direct hit (match) - then when the query is over, I'd have say, 80%
matches with (for example) 60% of those direct hits and 20% close
hits - I'm using PHP so I can use that to keep track of direct hits
and 'close' hits.

View Replies !
Searching Archives
I just joined this list and would like to search the archives before I ask a =
question. I there a way to search.

View Replies !
Searching On Two Keys With OR?
Which version is targetted for optimization of OR searching on two keys,
that is, "select * from sometable where f1 = 123 or f2 = 123",
as described in http://www.mysql.com/doc/en/Searching_on_two_keys.html
?

View Replies !
Searching On Two Keys With OR
Which version is targetted for optimization of OR searching on two keys,
that is, "select * from sometable where f1 = 123 or f2 = 123",

View Replies !
Fulltext Searching
How fulltext is working!!?

I have the following table with just one record! And when I do a select statement, mysql returns no hits!!!

Would you explain to me what is wrong?? Code:

View Replies !
Searching Blob
is it possible to search through blob data similar to full text searches?

View Replies !
Text Searching
I am using normalization on my database tables so that I can related each table to each other.The only problem is that I am using a full text search on 4 fields. These include: descrip, title, brand, category.
Now would I have to have these 4 fields in one table or could I normalize them and make split it up into 3 different tables as such.

table 1) descrip, title, brand_id, cat_id

table 2) brand_id, brand

table 3) cat_id, category

Once I have done that then would I still be able to perform a full text search on the 4 fields that I had mentioned above or would I have to keep them as one table.The main reason why I want to split them up is because in the brand and category fields I have alot of duplicate entries. Infact about 50 or so percentage of it is duplicate.I just want to try and make my dataset as small as possible as I will be having well over 2 million rows and I need the search performance to be fast.

View Replies !
Sorting And Searching.
I need to know how to display sorted queries with php,can anyone help?
I also need to know how to search a database, and display the results.

View Replies !
Postcode Searching
I have an interesting little mysql/php problem that Im trying to get my head around. Plus I thought it was long overdue that I sign up here instead of just trolling

I have a database with 3 fields

from_postcode, to_postcode, service_id

It tells me which postal services are available for a certain postcode

lets say for instance I want to search for DN2 4SQ

The match in the database would this record

from_postcode - DN0 0AA
to_postcode - DN9 9ZZ
and then I can read the service_id's in

So as you can see I sort of need to say WHERE postcode BETWEEN from_postcode AND to_postcode

But that doesnt work as its a text search - so postcodes starting with DN10 wont work as they match in the same group as above

Anyone any ideas as I've been all day

The only way I can think is to split the postcode into 4 chunks

[DN][0][0][AA] -> [DN][9][9][ZZ]

Then I can use between and less than/greater than queries to find if the search postcode is between those 2 values

View Replies !
Advanced Searching
I want to search the complete tables i am having. The searching should be like the following....Say if i give the word 'caring' as the keyword for search the i should get the result from the fields which is similar to caring..

ie it should display all the fields having data ..care,caring,very caring..etc

hope u all got it..I used the fulltext function and also match() But i am not getting the desired result.

View Replies !
Searching A Column
I have a database of filenames that when someone searches for a filename it uses LIKE against the column for wildcard matching.Some of the files I have entered recently have a $ (dollar sign) as part of the filename, and they are not showing up in the results. Do I need to slash them in order to work?

like '%test$test%'

View Replies !
Searching Across Table
Suppose I have 5 fields in my database (A, B, C, D, E). Is it possible to write a query that searches all of them?
I know that I can do
Code:

select A from my_table where a like '%ponies%' or b like '%ponies%' or c like '%ponies%' or d like '%ponies%' or e like '%ponies%'

But if I have 100 fields, that would be unwieldy. I could do this very easily with PHP but would prefer to optimize the DB query.

View Replies !
Searching By First Letter
I need a query to search for entries in my table where the first letter of last_name and first_name is the selected value. So, when I click on the letter 'a', it would return all entries where the last_name and first_name begin with the letter a.

View Replies !
Searching Date
I have a date type field in my table. Say the value is this month of this year - what sql would i need to search for dates which are a certain time before todays date, like 3 months?

View Replies !
Searching Zip Codes
I have a table that includes a US zip code column. It stores a 9 digit zip in the form of 12345-6789. I would like to be able to search it with accuracy to only the first 5 digit part, but I'm not getting far with my own ideas. Can this be done?

View Replies !
Searching In 2 Tables
I got this code and it works fine exept that it only searches in in column, is there a way to do a search in 2 columns
PHP Code:

SELECT * FROM {$sqlprefix}link WHERE description LIKE '%$term%' AND active = '1' ORDER BY out DESC 

View Replies !
Searching In All Tables
If I needed some type of information lets say... errr "xlordt" information... Say I need to query this users data... but.. I dont know in what table this user is in.... Is it possiable for me to add a query to search in all tables? and give me that users information? errr probably something stupid.. but... I need to know if its possiable or not.

View Replies !
Searching Keyword
i would like to be able to search a keyword, and match it against 2 columns.
so for example, I have cli_fname and cli_sname fields, and I want to be able to search for "mark williams" and have mysql match the search term against the two fields, but treated as one (if I am making sense)
I have tried CONCAT(cli_fname,' ',cli_sname) as cli_name, but if I add %keyword% LIKE cli_name, I get an "unknown field" error.
is there a way to do this?

View Replies !
Searching Several Fields
I'm after a solution to a problem which I can solve by doing lots of queries, but was wondering if there was a more elegant mySQL way of doing it.I'm writing a calendar app which will display dates of various courses. Each course has several dates associated with it stored in several fields of a database.I want to be able to search all the date fields (stored in datetime format) and return rows which contain dates within a certain range (i.e. for a specific date).However, what I want to be able to do upon getting the row result (or several rows for several matches) is for mySQL to be able to tell me which field the match came from.

View Replies !
Searching %% With Index
I try to search %name% from a field that already indexed, but it did not work, if i search only name%, then the indexed will be used.
Anyone know how can i solve the problem so that I able to search the text faster?

MYSQL fulltext looks like a solution, but too bad it cannot search word like:

Software Engineer
-> search "ware", will not work
-> search "Software", then work

right?

View Replies !
Searching With Mysql
My table in MySql looks like this
(id:int, usrid:int, title:char(30), descr:text, imgname:char(30), imgpath:char(30), links:char(20) );

I would like to enable users online search this tables "title" and "desc". What is the best way to enable users to search for a srting of words and find matches that contains the string or part of the string.

View Replies !
Simultaneous Searching
I am trying to build a system that will allow for a "Google-like" search of our site.
Each page consists of a title and various other content (TEXT) fields.
What I'd like to do is a search something like:
select pageid from pages where title is like '%query%' or summary is like '%query%' or content is like '%query%'...
for all 20 different query terms. Then I'd like to automatically highlight the matching result.
Now, it seems like a bit inefficient to essentially do the same query on so many different columns...the alternative is to do a separate select statement per column (i.e., limit the WHERE to 1 column), but that also seems inefficient.

View Replies !
Searching Through Different Fields
I'm trying to create a search bar on my webpage. My web page is a clothes shop and I want to be able to search by brand, shop name, dept etc... Each of these is a field in the table product. Code:

View Replies !
Searching Ampersands
i have created a query that is to search text in my database and it goes well. but my friend the other day is complaining that he did not find what he search in the database but actually the data is really in there.. the data contains ampersand(&) like 'tom & jerry' and also a text 'mcs of tampa inc'.
my query is this:

select * from mytable where mytext like '%mcs of tampa inc%'
select * from mytable where mytext like '%tom & jerry%'

in the first query, it runs ok when the text is 'mcs of tampa' but if i complete it to 'mcs of tampa inc' no results has been return.
is theres a special characters their?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved