change the value of $RESULT to
'12345' and change the if line to
if [ "$RESULT" = "12345" ] ; then
It adds a record to the database. So there is something wrong with what is
returned. Neither "0" or "count(*) 0" seem to work. So, does anyone have an
d had only
the line for RESULT=, and then did echo $RESULT. It returns nothing. Not a 0
or a 1, nothing.
> From: gerald_clark <[EMAIL PROTECTED]>
> Date: Mon, 09 Feb 2004 14:28:27 -0600
> To: Mike Tuller <[EMAIL PROTECTED]>
> Cc: MySql List <[EMAIL PROTECTED]>
> Su
application, with the mysql>
prompt. Nothing is inserted or updated in the database though.
This is the same problem I had when I tried to do it this way, but I am not
knowledgeable in shell scripting yet to know what I am doing wrong.
> From: gerald_clark <[EMAIL PROTECTED]>
&g
I have posted this question a few times, and have not seen the answer that I
need.
I have a shell script, that gathers information from systems, and I want
that info to be entered into a database. I want it to check first to see if
the data is already entered, and if not, add it. If it has already
is not the case?
Mike Tuller
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
rver 10.2, so if the suggestion you gave me is the
only way (or the best) I will have to upgrade the server. If there is
another way to do the same thing, please let me know.
Mike
> From: Egor Egorov <[EMAIL PROTECTED]>
> Date: Mon, 26 Jan 2004 15:40:54 +0200
> To: [EMAIL PROTE
I am stuck on this problem, and know there has to be a solution.
I have a shell script, where I want to check to see if a record exists, and
if it does then update the record with new information. If it doesn't then
insert the information gathered by a script.
How, in MySql, using a shell script,
I am trying write a shell script to check to see if a record exists and if
it does, update information, and if it doesn't insert information. Is there
a way to do an if else statement in MySql?
I'm stuck on how to do this. I don't want to write it in perl.
Mike
--
MySQL General Mailing List
F
not
sure how to how to put it all together to do what I want this to do.
Something like this:
SELECT * WHERE ethernet_address = $ethernet_address
(if the number of results does not = 0)
UPDATE hardware_assets SET location='my location' WHERE
ethernet_address='$ethernet_address
Else
IN
I have the user hardware set to be able to connect to the database from any
host. That is why I am so confused as to why this doesn't work.
Mike
> From: Andrew Boothman <[EMAIL PROTECTED]>
> Date: Wed, 14 Jan 2004 01:04:36 +
> To: Mike Tuller <[EMAIL PROTECTED]>
-p cetechnology
And then enter my password.
What is the difference?
Mike Tuller
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
s and then if there is a match, that row is updated, if
there is no match, then the data is inserted into a new row.
Mike
> From: Brent Baisley <[EMAIL PROTECTED]>
> Date: Thu, 16 Oct 2003 14:29:21 -0400
> To: Mike Tuller <[EMAIL PROTECTED]>
> Cc: MySql List <[EMAIL PROT
I have a shell script that I have data entered into a database, and instead
of just entering in the data blindly, I want it to check to see if the item
it is entering exists already, and if it does, update the information rather
than inserting it. So I want to run a select statement, and if results
run the script, I check the data, and nothing was entered. When I
run each statement on it's own (not from a script file, but in the shell)
Everything seems to work. It just doesn't work when you try to run it from a
script.
Any ideas?
Mike Tuller
--
MySQL General Mailing Lis
I am fairly new to this, so please bare with me on this.
I am designing a database that stores information about the computers I
manage, and am developing a PHP front end to add, view, and edit information
about the computers. One issue I ran into is designing the hard drive
information. Some com
I posted the solution a couple of nights ago. The mysql folder and some of
the files within have the owner set to root. You need to change that to
mysql.
> From: anthony ortega <[EMAIL PROTECTED]>
> Date: 27 Jan 2001 22:46:25 -0800
> To: [EMAIL PROTECTED]
> Subject: simple problem with mysql inst
t;> Apache also does not respond to the typical shutdown and restart
>> commands given in the Apache manuals. Redhat has it set up to respond
>> to their own commands.
>>
>> On 26 Jan 2001, at 19:10, Mike Tuller wrote:
>>
>>> I recently upgraded to RedHat 7, and
> they left off mysql. Go figure.
>
> Apache also does not respond to the typical shutdown and restart
> commands given in the Apache manuals. Redhat has it set up to respond
> to their own commands.
>
> On 26 Jan 2001, at 19:10, Mike Tuller wrote:
>
>> I recently upgr
I recently upgraded to RedHat 7, and now I can't get Mysql to start. I keep
getting error 2002: can't connect. I have looked at every piece of
documentation, and can't find the solution. The mysql.sock file exists, but
it still can't connect.
I have used the rpm of version 3.23.32 to install ever
19 matches
Mail list logo