Hi, iam learning MySql. Iam trieing to create a table in the database "guestbook"
at the command line in mysql heres what i type but i get a error
mysql>create table guestbook
->(
-> name varchar(40) null.
-> url varchar(40) null.
-> comments ... (3 Replies)
Guys,
I want to insert some values from a log file into a temporary table. the values in the log file looks like this
SV_NAME CC_NAME CP_DISP_RUN_STATE
------- ------------------- -----------------
sble01 ALLTEL WorkMon24Hrs Running
I want to enter the... (2 Replies)
I have 20000 numbers present in a file in each line like
25663,
65465,
74579,
56446,
..
..
I have created a table in db with single number column in it.
create table testhari (no number(9));
I want to insert all these numbers into that table. how can i do it?
can anybody please... (4 Replies)
(sorry for my english)
Hi, i have an app that uses MYSQL API C.. i trying do a timeout until the table is locked by an other thread , in the docs of Mysql i can see that MYSQL_OPT_READ_TIMEOUT is not implemented for linux ¿?¿?.. any body knows a way to do a timeout until the table is locked by... (0 Replies)
Hi,
I want to insert data into a table from a flat file, the file is having around 25 columns and some 10,000 records.
The columns values are seperated by a space.
Thanks (1 Reply)
I'm having trouble with this code.
if i do
.\read.pl -u user
it prints out
2010-12-20 12:00:00 host1 <cmd>a
2010-12-20 12:00:01 host1 <cmd> <execute>
2010-12-20 12:00:02 host1 <cmd>b
2010-12-20 12:00:03 host1 <cmd>c
however, if i enter
.\read.pl -h host1
it should... (3 Replies)
I have set a mysql file to excute everyday morning to generate a html file displayng 2 tables from the database. Sometime they cannot be shown, and it shows the tables are not existed. I have not drop any table, and those 2 tables are not used by any other excution. Anybody know what is happening?... (0 Replies)
Hi all,
I am reading control file log from my server and putting it to a variable
for j in $(cat $dirname/ctl_file.log)
do
if
then
Y=${#fileclob_ctl_file}
if
then
fileclob_ctl_file=$j
else
fileclob_ctl_file="${fileclob_ctl_file},${j}"
fi
fi
... (5 Replies)
I have a MYSQL table with demographic data. The addresses contained in the table were entered manually before the advent of online postcode lookup software and, hence, there are a lot of errors when using automated online mailing checking software. I plan to export the data as csv file for a 3rd... (1 Reply)
I have two scripts, each script reads an individual data file and copies specific lines of data and sends to MySQL table. Only difference is, each script sends data to a separate column on the same DB. I want to use one script to populate DB table and have data look horizontal, with no overlapping.... (3 Replies)
Discussion started by: SysAdminRialto
3 Replies
LEARN ABOUT DEBIAN
notedb::mysql
NOTEDB::mysql(3pm) User Contributed Perl Documentation NOTEDB::mysql(3pm)NAME
NOTEDB::mysql - module lib for accessing a notedb from perl
SYNOPSIS
# include the module
use NOTEDB;
# create a new NOTEDB object (the last 4 params are db table/field names)
$db = new NOTEDB("mysql","note","localhost","username","password","note","number","note","date");
# get a single note
($note, $date) = $db->get_single(1);
# search for a certain note
%matching_notes = $db->get_search("somewhat");
# format of returned hash:
#$matching_notes{$numberofnote}->{'note' => 'something', 'date' => '23.12.2000 10:33:02'}
# get all existing notes
%all_notes = $db->get_all();
# format of returnes hash like the one from get_search above
# get the next noteid available
$next_num = $db->get_nextnum();
# recount all noteids starting by 1 (useful after deleting one!)
$db->set_recountnums();
# modify a certain note
$db->set_edit(1, "any text", "23.12.2000 10:33:02");
# create a new note
$db->set_new(5, "any new text", "23.12.2000 10:33:02");
# delete a certain note
$db->set_del(5);
# turn on encryption. CryptMethod must be IDEA, DES or BLOWFISH
$db->use_crypt("passphrase", "CryptMethod");
# turn off encryption. This is the default.
$db->no_crypt();
DESCRIPTION
You can use this module for accessing a note database. There are currently two versions of this module, one version for a SQL database and
one for a binary file (note's own database-format). However, both versions provides identical interfaces, which means, you do not need to
change your code, if you want to switch to another database format.
Currently, NOTEDB module is only used by note itself. But feel free to use it within your own project! Perhaps someone want to implement a
webinterface to note...
USAGE
please see the section SYNOPSIS, it says it all.
AUTHOR
Thomas Linden <tom@daemon.de>.
perl v5.10.1 2011-02-12 NOTEDB::mysql(3pm)