|
Aleonis wrote: employer always looking for something that would cost 0$ and be as functional
And yet it may end up costing substantial amounts in down stream support. This is something most organisations do not consider and it is well known that support cost are more than development costs!
Still I would hate to lose all the options like postgres so I hope it works and works well and it does sound like it is the right tool for your job.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yeah, it`s like you work as a lead producer in EA and suddenly someone bestows upon you a free Aston Martin DBS... While car is yours for free, it`s repairs, fuel, taxes and other cash drains will become a great burden & start drain your budget. Free gift becoming surgical strike at the company`s budget.
|
|
|
|
|
How can I use database to get the list of those who give feed back to my WEB SITE?
I have designed a small site using PHP to get NAMES and FEED BACK on how nice or poor my WEBSITE IS and it require that i need to use DATABASE SYSTEM in my WEB DESIGN.Did any one know how I can attach DATABASE Program to this small site .Thanks
|
|
|
|
|
Have you bothered to do any research for yourself? Have you tried anything?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
You need to make sure that you have a database installed in the same location as your website
with a simple google I found this!
PHP:MySQL Manual[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Hi,
PHP-Mysql combination is like bread and butter. First you need to install Mysql. Or use some packages like Wamp server.
Then ,
1. create a database
2. create a table namely 'feedback', with three fields such as dtTime, name , comment.
Create table feedback(dtTime datetime, name varchar(55), comment text);
Then on website create a page for entering user feedback. Then on serverside
<?php
$date = date('Y-m-d H:i:s');
$name = $_POST['email'];
$comment = $_POST['comment'];
mysql_connect("localhost", "root", "");
mysql_select_db('dbname');
$query = "INSERT INTO feedback VALUES($date, '$name', '$comment')";
$res = mysql_query($query);
if($res)
echo "Successfully posted your comment";
?>
for retrieving these comments, write query according to that..
|
|
|
|
|
Then you'd better introduce OP to Bobby Tables[^]
.. or maybe even discover him yourself.
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
hi everybody
I want to execute a query in excel using Microsoft.ACE.OLEDB.12.0 since database is in dbase iv
query is
SELECT A.EMPCODE,c.EMPNAME,A.REMCODE,emprem,B.REMSHNA,sum(amt_add*nomnt) as amt ;
from d:\staff\file\fbp11 a, d:\staff\file\reim b, d:\staff\file\empl c where a.remcode = b.remcode and a.empcode = c.empcode ;
and !b.reielg and a.emprem in (select emprem from d:\staff\file\fbp11 where month = '201111') group by emprem
but it says "character found after end of sql statement
"
what could be the problem
|
|
|
|
|
Start with removing the semicolons at the end of each line.
A semicolon denotes the end of a statement.
|
|
|
|
|
thanks u
|
|
|
|
|
I am new in visual studio and i want to know if it is possible to make
some colunms on a report to be dynamic so as to allow a user input for a example i have created this report called: Sales Report
this is how my Sales Report looks likes.
SalesCountry CurrentMonthSales PriorMonthSales
Australia 592.809 619.855
England 270.132 546.596
China 186.928 154.576
As seen above in this report, i want to make CurrentMonthSales,PriorMonthSales colunms dynamic so to allow user input because these fields changes dynamically according to user's criteria.A user may want to view current monthsales of December instead of November.
|
|
|
|
|
I don't think you need dynamic columns. From your descriptions, the columns are fixed i.e. they are SalesCountry, CurrentMonthSales, and PriorMonthsSales. What you need is a dynamic report i.e. data is provided to the report depending on some input criteria. Assuming you are using SQL Server as the database, you need to create a stored procedure that takes a parameter for the current period, then it returns data to your report using those 3 columns. So, the data is dynamic but the columns are fixed.
Since you don't specify what report engine or database you're using, I can't be more specific.
modified 23-Nov-11 17:00pm.
|
|
|
|
|
Hi . I am designing a query . I want to write a trigger that accepts parameters. Is this possible how?
and if not what should I do to solve this ?
Thanks
modified 22-Nov-11 7:01am.
|
|
|
|
|
The subject and the question are completely unrelated to each other.
yousefshokati wrote: can a trigger have parameters?
NO.
yousefshokati wrote: I am designing a query . I want to write a query that accepts parameters. Is
this possible how? and if not what should I do to solve this
Write a Stored Procedure.
|
|
|
|
|
In SQL Server the trigger has two tables "inserted" and "deleted". These contain all columns in the table effected. Note for a delete query inserted is empty, for an insert deleted is empty.
|
|
|
|
|
thanks for your attention . I know that we have those tables in triggers . I am not doing dml action to effect them .
I have a query that returns some "Personnel Codes" that these codes should be in the trigger as input . Now I am looking a way to solve this problem .
thanks
|
|
|
|
|
It is difficult to decipher what you really mean but let me take a a guess. You have a query that returns Personnel codes... I am assuming that you want to do something with personnel codes. If you are to use a trigger, then you must be peforming inserts, updates or deletes in a table. You said you're not doing DML, so triggers don't apply!
You don't describe the problem in sufficient detail but I'll make a guess. You're getting some values using a query and you want to do something based on the results returned. I think you need to do everything in a stored procedure.
Your stored procedure would have a section that queries for personnel codes.
It would also have a section that performs some action based on the personnel codes.
If you would describe the problem in sufficient detail, it would be easier to help. I would also suggest tha you avoid describing the problem in terms of the solution i.e. your problem description presupposes that triggers are the answer. Just state the problem in sufficient detail.
|
|
|
|
|
Hi . thanks for your attention .
The problem is I have list of personnels that every month give some money to the bank of our firm . If their balance reaches to for example 100$ then they can enter to the list of people who can use loan (TurnsTable).
Now I have a SP that each month adds for example 20$ to all of our staff's Balance all in the same time . this is an important insert to my DB because when an insert takes place I want to write a trigger to check the total balance after insert.If the balance would reach to the special amount(100$) then this person's Personnel code must be inserted to the TurnsTable which maintains the list of personnel who wants loan . because of this i needed to know that can i send parameters to the triggers ?
what do you suggest to my problem ? How can i solve it?
|
|
|
|
|
This is not a good idea for a trigger. You could create an AFTER INSERT trigger that calculates a new balance and if that balance exceeds $100, to then insert a record into another table. You now have the potential for creating a circular operation which is not good.
The previous suggestions for using a procedure to perform the balance calculation and to then insert or delete based upon the result of that calculation makes much more sense and will be prone to less errors.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
I would create a stored procedure that takes two parameters: personnel code and the amount by which to update the personnel balance. I would also use a transaction to ensure that no two users update the same record at the same time
CREATE PROCEDURE updateBalace
@personnelCode int
@amount decimal
AS
SET @actionAmount decimal=100.00
BEGIN TRAN
UPDATE Personnel SET Balance=Balance+Amount WHERE PersonnelCode=@personnelCode
IF EXISTS(SELECT Balance FROM Personnel WHERE Balance>@actionAmount AND
PersonnelCode=@personnelCode)
BEGIN
END
IF @@ERROR >0
ROLLBACK TRAN
ELSE
COMMIT TRAN
My code is not kosher but you get the general idea.
|
|
|
|
|
SilimSayo wrote:
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Thanks Chris.
I needed to amuse myself a little.
|
|
|
|
|
THE TRIGGER WON'T HAVE PARAMETERS.
|
|
|
|
|
i initially got unable to load, file is being used by another program so i stopped the sqlserver service and tried again..
i now have this...
Error 26 Error locating server/instance specified...
the servers there and ive pointed it directly at the mdf,
what else could be happening here...
|
|
|
|
|
Its okay, fixed it..
needed to start the sqlserver services, had it set to automatic, apparently it doesnt like it
|
|
|
|