473,383 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

problems with @ symbol in varchar field

I am trying to do a search on a varchar field containing email addresses,
however the @ symbol seems to be creating problems, any suggestions? Current
code:

use strict;
use CGI::Carp "fatalsToBrowser";
use CGI ":standard";
use DBI;
use CGI qw(param);
my $email = param('email');
my ($dbh, $sth);

$dbh = DBI->connect("DBI:mysql:user:localhost","database","pa ssword");
my $sth = $dbh->prepare("SELECT * FROM database WHERE email = $email");
$sth->execute;

my @record = $sth->fetchrow();
my $email = $record[0];
my $balance = $record[14];
print"Content-type:text/html\n\n";
print
"<font face=\"Verdana, Arial\" size=\"1\" color=\"#006600\">$email
$balance</font>";
print "\n";
$sth->finish;

$dbh->disconnect;
Jul 19 '05 #1
0 1402

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: noViagraHere | last post by:
I am trying to do a search on a varchar field containing email addresses, however the @ symbol seems to be creating problems, any suggestions? Current code: use strict; use CGI::Carp...
2
by: Ryan | last post by:
I am having problems creating a new table with a default and auto increment such as this... CREATE TABLE `customer` ( `cust_id` INT( 5 ) DEFAULT '00000' NOT NULL AUTO_INCREMENT , `cust_name`...
0
by: Nico den Boer | last post by:
Hi all, I'm working with: MySql: Database server: mysql-4.1.7-essential-win ODBC driver: MyODBC-3.51.10-x86-win-32bit Administrator: mysql-administrator-1.0.14-win Query browser:...
4
by: Russell | last post by:
I'm having a fit with a query for a range of dates. The dates are being returned from a view. The table/field that they are being selected from stores them as varchar and that same field also...
0
by: Marko Poutiainen | last post by:
Situation: We had to make our SQLServer 2000 database multi-lingual. That is, certain things (such as product names) in the database should be shown in the language the user is using (Finnish,...
10
by: Techie | last post by:
what's the difference of the two data types?
2
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in...
0
by: maheshmohta | last post by:
Background Often while remodeling legacy application, one of the important tasks for the architects is to have an optimum usage of storage capabilities of database. Most of the legacy applications...
2
by: karinmorena | last post by:
I'm having 4 errors, I'm very new at this and I would appreciate your input. The error I get is: Week5MortgageGUI.java:151:cannot find symbol symbol: method allInterest(double,double,double)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.