Match Records

2001-03-05 Thread Website4S

I`m trying to find the best method to match records between two tables in a 
MySQL database. But it must match atleast once, so here is a scenario for you 
to think about.

Member - Job, Salary, Location
Jobs - Job, Salary, Location

All values will be enum sets in both tables as follows

Job = enum 'developer','designer','none'
Salary = enum '10K','15K','none'
Location = enum 'usa','uk','none'

Ok so the user has come to the site and I have his Job Salary and Location 
stored, he clicks a link which then performs the search. His values are as 
follows..

Job = developer, Salary = 10K, Location = uk

I want to search the Jobs table and match it with the above, this part I can 
do. The next stage is if it doesn`t find any matches it then finds the 
nearest. So if the only record I have in the Jobs table is as follows

Job = developer, Salary = none, Location = uk

How do I go about making it pick up the nearest.

At the moment I am using

SELECT * FROM Jobs where Job='$Job' and Salary='$Salary' and 
Location='$Location'

So obviously it won`t match them, anyone wake me up from my slumber and help 
me out with this?

Cheers
Ade

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Table joining/setup advise?

2001-02-24 Thread Website4S

Hi, 

I`m setting up a email system, the same type of system as Yahoh Groups, 
Topica etc.. I`m just in need of some advise as to how best to handle my 
tables. At the moment I have the following tables setup.. 

Lists - Stores info about the list 
ListOwners - Stores all List Owners info 
Members - Stores all member info 
Archive - Stores all messages sent to the lists 

I am trying to figure out the best way to associate Members with Lists that 
they have signed up to, at the moment I can only think of 2 methods both of 
which wouldn`t be very good. 

First being to have a couple of fields in the Members table which would store 
the title of the list they signed up to, the problem with this is that they 
would be limited to how many lists they sign up to. 

Second method would to store in the Lists table the members ID but again this 
would be limited to however many rows I create. 

Another method I have just thought of would be to create a table called 
Subscribe and store the List name, Member ID and email address. But that 
might slow it down a bit when searching for the email address`s to send the 
actual message out. 

Any one else offer any thoughts on this. 

Thanks 
Ade 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Auto-Inc question

2001-02-22 Thread Website4S

In a message dated 22/02/2001 12:22:26 GMT Standard Time, [EMAIL PROTECTED] 
writes:

 
 30 seconds work(less time than it took you to type your email) would've 
revealed the answer:
 
 1. Click on "the manual" link at the bottom of this message.
 2. See the search box?  Type in "auto increment".
 3. Click on the "myisamchk" link.
 4. Read.
 
 Or, to make it even easier:
 
 http://www.mysql.com/doc/m/y/myisamchk_other_options.html
 
 Please, next time, bother to search the manual before wasting other's time 
answering questions to which 30 seconds research would reveal the answer.
 
 --
 Ed Carp, N7EKG [EMAIL PROTECTED]   940/367-2744 cell phone
 http://www.pobox.com/~erc  [EMAIL PROTECTED] - text pager
  


Ok well thats the the third reply I have just read of yours to peoples 
questions, I did research it but was trying to find a better method, I came 
up with the method of logging into mysql deleting the ID row recreating it 
and viola done. To me much faster than your method.

Also seeing as this was the third post of yours which wasn`t very 
constructive to peoples questions might I suggest you don`t bother replying 
if we are wasting your time, the delete button is there for a reason and this 
mailing list is for asking questions.

Ade

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Date???

2001-02-10 Thread Website4S

Hi,

I`m selecting information from my MySQL as follows...

Select * FROM Features WHERE Platform='pc' and Public='Y' Order by DateTime  
ASC LIMIT 0,3

I am storing the field DateTime as a date when selected it looks like this 
2001-05-05 but I want to change it so it looks like May 5th 2001, I`ve looked 
about and found the DATE_FORMAT method but I have no idea how to use it on my 
select without it effecting my Order by, anyone have any tips?

Thanks
Ade

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Insert into blob

2001-02-05 Thread Website4S

Hi,

I am having some problems inserting data into a blob field, everything works 
fine but if I use any HTML and try to insert it, it doesn`t work. So in short 
is there something I  should be doing to allow HTML to go into a text blob? I 
 am using PHP if that helps.

TIA
Ade

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




OT - Cron

2001-01-25 Thread Website4S

Hi,

I`ve been searching for hours now so I thought I`d ask some lists I belong 
to, does anyone know of a decent CRON tutorial???

TIA
Ade

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Drop Database

2001-01-25 Thread Website4S

David,

Firstly are you sure it`s a database you have created and not a table?

Either way try the following

DROP DATABASE #Muffin;
or
DROP TABLE #Muffin;

HTH
Ade

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Ideas??

2001-01-24 Thread Website4S

Hi, 

I am creating a web site which allows users to post projects and then others 
to place bids. I am setting up two tables in MySQL 'Projects'  'Bids' my 
problem is how best to cross reference. What I was thinking of doing is 
creating a number of fields in the Projects table... 

Bid1 
Bid2 
Bid3 
etc 

and then inserting the BidID from the bids table into Bid1, and if that is 
already used then it will go into Bid2. But how many Bid# shall I create?? 
I`m sure there must be a faster method than this, anyone have any 
suggestions?? 

TIA 
Ade

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Ideas??

2001-01-24 Thread Website4S

Hi Greg,

Thanks for that, perhaps I should drink more coffee help my brain to be a bit 
more active at 5.30 in the morning.

Cheers
Ade

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php