hm...u mean a primary key?
if so yeah i do have a unique column in my table...
User Profile
Collapse
-
How to filter duplicate entries in mysql?
hey guys,
i'm stuck with finding a sql statement for filtering out duplicate entry
i got like thousands of entry but i would like to put a filter on so i can see all the duplicate entries
any idea how? -
hm...all i know is if a session expires
the session is deleted and becomes empty
perhaps that;s why it always detect it is an empty session
i've read some issues on this, apparently it's said to be a bug in the module
but no proven evidence yetLeave a comment:
-
opps sorry
[CODE=perl]
#!/perl/bin/perl
use strict;
use DBI();
use CGI;
use CGI::Session(' ip_match ');
use Digest::SHA1 qw(sha1);
my ($dbh, $sth, $name1, $name2, $session);
my $cgi = new CGI;
my $username = $cgi->param('usernam e');
my $password = $cgi->param('passwor d');
if($username ne '')
{
...Leave a comment:
-
yup i did
ok let me show u my logi script
ignore the ##username## and ##password## portion, i need to mask it off
so this is my log in page
[CODE=perl]
#!/perl/bin/perl
use strict;
use DBI();
use CGI;
use CGI::Session(' ip_match ');
use Digest::SHA1 qw(sha1);
my ($dbh, $sth, $name1, $name2, $session);
my $cgi = new CGI;
...Leave a comment:
-
hm.i get what u mean
by right it should be under a column name
actualli that field of mine is called commands
commands that ppl use during a telnet session
sometimes commands can be very long with number
and i just wanna query say wildcard the number and get the results
with regards to
[CODE=mysql]
NAME = %345%
[/CODE]
i've tried and doesn't worked...Leave a comment:
-
hm...i tried using wild card too
the reason why it doesn't work is 'cos
i want to make sure the number is attached to NAME
so if i have 2 rows each containing;
NAME :11223345565
CLASS: 18373556879
if i use use wild card with %556%
it's gonna return both the rows
but i only want it attached with NAMELeave a comment:
-
-
hwo to use REGEXP to find rows with any numbers in between?
hey guys,
i got a question on REGEXP in SQL
if i have a row containing the info
NAME : 12344455667678
how can i use a SELECt with REGEXP
[CODE=mysql]
SELECT * FROM `mml log` WHERE Commands REGEXP
[/CODE]
such that it will search anything in the field with NAME : $input
in which the $input is given by my users
so say is $input is... -
hm...so when u do a i++, it's actually going on to the next line right??
alright i will try that
'cos currently i;m using foreach
i shall show u part of my code
[CODE=perl]
foreach $data1 (@data)
{
chomp ($data1);
if ($data1 =~ /DISTUR/ && $data1 !~ /DISTURBANCE/)
{
print "DISTUR ";
my $alarm_class_li ne = index ($data1, "DISTUR");...Leave a comment:
-
how do i go onto the next line of data in a text file?
hi guys,
i got the info say
CLASS 1234
NAME DAN
if i use the code below:
[CODE=perl]
if ($data1 =~ /CLASS/)
my $alarm_class_li ne = index ($data1, "CLASS");
my $alarm_class = substr ($data1, ($alarm_class_l ine+6),4);
print "$alarm_cla ss ";
[/CODE]
it will print out 1234
but how do... -
hm..i'm not too sure either
cos i'm doing a research on such hash function too
and also optimizing MySQL such that the retrieval of large data from MySQL will be fast
perhaps if there's any good books or references, perhaps you could state down?Leave a comment:
-
confusion over is_expired and is_empty in CGI:Session
hey guys,
i'm not sure if u guys have place this problem before
i did an expiration of my CGI session for 1 min
and i got the code below to detect
[CODE=perl]
if($session->is_expired)
{
print $cgi->header(-cache_control=> "no-cache, no-store, must-revalidate");
print "<p>Your has session expired. Please login again.<p></br>";... -
Any hash function in MySQL?
hey guys,
i'm not sure if u all know what hash algorithm is?
it's supposed to make retrieval of data much faster
i was wondering if there's such stuff in MySQL? -
thanks..
i've actually found a workable code
right this code is for logging in
[CODE=perl]
#!/perl/bin/perl
use CGI;
use CGI::Session (' ip_match ');
use CGI::Carp qw/fatalsToBrowser warningsToBrows er/;
$q = new CGI;
$usr = $q->param('usr') ;
$pwd = $q->param('pwd') ;
if ($usr ne '')
{
if($usr eq "demo"...Leave a comment:
-
how session tracking is done in perl?
hey guys,
i've done most of my web app. for searching almost done
but then i got a small little problem with logging in
i need to know how session tracking is done in perl
if not my log in page would truely be redundant -
hm..i tried to use that
and it appears that when i tried to use SHA1 encryption in Digest::SHA1 and SHA1 encryption in DBD, it seems both dun match
so just sharing thisLeave a comment:
-
opps alright i know the problem
i declare the my length for my password in my password field too short
that's why the verifying ran into problems
thanks anyway atli...Leave a comment:
-
do i need the module digest::SHA1 to verify password encrypted using SHA1?
hey guys,
I've stored password in mysql using SHA1 encryption
do i need the module digest::SHA1 when i'm verifying password for user put in? -
hi,
hm..with respect to yr validation part
i realise when i printed this SQL statement on mysql client
it returns me an empty set
so i'm not sure if that really works...Leave a comment:
No activity results to display
Show More
Leave a comment: