[jadmin] JUD/Users-Agent and creating DB
Eddie_Dandrades at waters.com
Eddie_Dandrades at waters.com
Tue Jun 27 10:28:27 CDT 2006
Can someone give me a hand with this. I'm trying to execute ./createdb so
I can install and configure Users-Agent but I get this:
DBD::mysql::st execute failed: You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near 'INDEX, first VARCHAR(50) INDEX, last VARCHAR(50)
INDEX, nick VARCHAR(50) INDEX, ' at line 1 at createDB line 14.
================This is the entire script:======================
#!/bin/sh
#-*-Perl-*-
exec perl -x $0 "$@"
#!/perl
use DBI;
use strict;
my @dbs = DBI->data_sources("mysql");
my $DBHandle = DBI->connect("$dbs[0]","root","");
$DBHandle->func("createdb","JUD","admin");
$DBHandle->disconnect();
my $DBHandle = DBI->connect("DBI:mysql:database=JUD","root","");
my $sth = $DBHandle->prepare("CREATE TABLE jud (jid VARCHAR(100), name
VARCHAR(100) INDEX, first VARCHAR(50) INDEX, last VARC
HAR(50) INDEX, nick VARCHAR(50) INDEX, email VARCHAR(50) INDEX);");
$sth->execute;
$DBHandle->disconnect();
Thanks
===========================================================
The information in this email is confidential, and is intended solely for the addressee(s). Access to this email by anyone else is unauthorized and therefore prohibited. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful.
===========================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.jabber.org/pipermail/jadmin/attachments/20060627/ce1b987b/attachment-0003.html
More information about the JAdmin
mailing list