Hi,
I am going crazy with a problem and would really appreciate if anybody could help me with it!! Here is what I am trying to achieve:
I have two tables - "tickets" and "ticket_updates"
tickets has following columns:
TicketId, UserId, AssignedToId, ... DateCreated, Status
ticket_updates has following columns:
UpdateId, TicketId, UpdaterId, ... DateUpdated
I am...
Quote:
Originally Posted by r937
that's the right conclusion, but the logic is slightly off
if the company does not need to have an image, then the image columns are ~not~ mandatory
as for best practice, what do you do if a company needs to be registered but it does not have a fax number?
Yes I see your point. But an ...
Thank you sir I saw your post of timeline in a different forum and managed to sort it. That was a great help it's been a week I've been at this query.
Thanks
Zed
If the view consists of more than one table then you will not be able to
insert in to it. Instead you must construct a separate insert statement per
table that you wish to populate.
the view consists of one table. i understand the rules of views.
its that im using aes_encrypt in the creation of the view, and it doesnt encrypt the data it errors. Ive created a test view with out the aes_encrypt in the view and it inserts fine no prob. what i would like is to use aes_encrypt in the view not the insert statement.
less overhead on app.
i've used aes_decrypt ...
Apparently there was no way to do this, so we ended up moving the entire database. On Windows:
1) Stop the MySQL service
2) Move the data folder from
X:\OriginalLocation\data\
to
Y:\NewLocation\data\
3) Add this line to my.ini
datadir=Y:\NewLocation\data\
4) Restart the MySQL service
i'm not sure i used the correct columns (see below) but the structure of the query you need involves a LEFT OUTER JOIN for the specific charity
Code:
SELECT c.charityID
, c.charityName
, myCharity.relationshipType
FROM UserContacts uc
INNER
JOIN UserCharities friendCharity
ON friendCharity.userID = uc.contactID
AND friendCharity.relationshipType IN ( 1,3 )...
helo... i have a problem with some tables and getting data from them... hope some one can help me...
ok i have two table
TABLE A:
-id
- product_number
-costs
TABLE B:
-id
- product_number
- typ_of_product
the two product_number are the same...
now the idea si this:
i need to get all the typ_of_product which made in TABLE A most costs ORDERED BY DESC and ...
ok i have solved it thanks anyway:
CREATE VIEW temporary AS SELECT `produkt_numer` as numer, `typ_of_product` as typ,`costs` as s
FROM `tableA` , `tableB`
WHERE `tableA.product_number` = `tableB.produkt_number`;
select count(numer) as howmuch, typ from temporary group by typ order by homuch desc;
i'm glad you solved it, but i should like to point out that ...
1) `tableA.product_number` and `tableB.produkt_number` are invalid (you can't put backticks around the qualified columns like that)
2) you don't actually need a view
Code:
SELECT COUNT(*) AS howmuch
, typ
FROM ( SELECT tableA.product_number AS numer
, tableB.typ_of_product AS typ...
first thing you should do is rewrite the query to use JOIN syntax secondly, if you are "querying the DB for a specific client name" then you should put that into the WHERE clause Code: SELECT ... FROM trips INNER JOIN locations ON locations.id = trips.locationid INNER JOIN salesmen ON salesmen.id = trips.salesmen_id WHERE trips.client_name = 'Mr. Jones' the third step is to figure out which columns you want in the...
Hi i am having a query such as Code: SELECT * FROM #__vm_product AS prd INNER JOIN #__vmfprodsubcategory AS feat ON feat.product_id=prd.product_id INNER JOIN #__vm_product_category_xref AS cat ON cat.product_id=prd.product_id WHERE prd.product_id IN (1,5,5,6) AND cat.category_id=1 GROUP BY prd.product_id As you have seen there is a Code: WHERE prd.product_id IN (1,5,5,6) where some ids are being reffered more than 1 times. But the query...
nope becuase it'd be virtually impossible to code the import file for this. there is no way I could conceive that you would be bale to make an import process flexible enough to decide off its own bat whcih fields go where if there are fields missing in the input stream if you don't have data for the column then supply a null value, usually this is a comma followed by another comma if you are using CSV
you would, also, need a count of the days of the week. In your instance here that would be a 2, maybe another subquery and then calculate avg on your own? Dave
Hello I have just designed a database with an inheritance relationship. I have supertype as a table on its own. Each subtype would also have a table too. i need to reference the supertype with the subtype. supertype table: - id (PK) - ..other fields each subtype table: - id (PK) - ..unique sub fields Should i make subtype id a FK as well as a PK so it can reference its parent supertype? OR should i introduce an additional field that does the...
As a moderator I should point out you can (and should) be getting your answers for free like everyone else but seeing as it's Christmas I'll put your donation towards the kids presents
WELL MAY the table field prior be int converted to string... a new problem: When I have a text area and somebody types in without space when appeared data in html table the structure modified to fullfill the long word like typing "ffffffffffffffffffffffffffffffffffggggggggggggggg gggggggggggggggfffffffffffffffffffffffffffffgggggg ggggggggggggggggggggggggfffffffffff" well is any way from textarea text get cut in the middle so...
Thread profile page for "MAX() in WHERE clause" on http://www.dbforums.com.
This report page is a snippet summary view from a single thread "MAX() in WHERE clause", located on the Message Board at http://www.dbforums.com.
This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity