Query error need help please

2004-09-14 Thread Soheil Shaghaghi
Hello. I have a subroutine which checks for multiple entries and if a user has voted once in the same day, it will not calculate the vote. However, I found out that it does not really do this. What it does is only look at the last entry. If the user IP address is the last entry it does not

Need help with a query

2003-12-27 Thread Soheil Shaghaghi
Hello everyone, I need help with MySQL coding in php please if anyone can help. I have 3 tables: -users, where the user info is stored. -awards: contains the list of all the awards for each user -award_types: contains different types of award The tables are at the bottom of the page. What I

Getting Fields from a sql table

2002-10-07 Thread Soheil Shaghaghi
Hello everyone, Can someone please tell me how I can do the following: From the query below, I want to get the details of the header of the message and display them on a page, one per line. If I just query the Header field, it displays them in one long line. What can I do to display the them one

Moving Mysql

2002-09-12 Thread Soheil Shaghaghi
Hello everyone, I have my MySQL database n the var partition of a FreeBSD server. The problem is that the partition is almost full, and now I can't start the SQL server! I am thinking of moving the MySQL data directory to another partition, but I don't know how I should do this. Can anyone

limiting the user

2002-08-31 Thread Soheil Shaghaghi
Hi everyone, I am running a FreeBSD server with MySQL 3.23 I want to let my virtual users create/drop tables and limit the size of each table, and also the number of tables they can create. Can someone please tell me how I can do this? Is it possible wit applications such as webmin, or

limiting the user

2002-08-29 Thread Soheil Shaghaghi
Hi everyone, I am running a FreeBSD server with MySQL 3.23 I want to let my virtual users create/drop tables and limit the size of each table, and also the number of tables they can create. Can someone please tell me how I can do this? Is it possible wit applications such as webmin, or

What's wrong with this code?

2002-08-26 Thread Soheil Shaghaghi
Hi everyone, In the following code: sub DATEJOINED{ my %arg = @_; if (! $arg{USER}) {return undef} return $arg{USER}-get(field='RegistrationDate'); } The field Registration date is returned from the mysql table for the user who is

mySQL Language

2002-06-02 Thread Soheil Shaghaghi
Hello everyone. I am trying to add non-Latin text to MySQL. Specifically speaking I need to use Persian fonts. I can add the text in the sql tables with no problem. I can also display them on the generated cgi pages which call those tables. The problem I have is when I go back to edit these

Delete Problem

2002-05-28 Thread Soheil Shaghaghi
Hello everyone. I have an issue that can't figure out, and was wondering if someone can help me with it. I offer mySQL based e-mail account to my users. The actual e-mails are stored in a text based directory. Sometimes when the e-mail is put in the trashcan, it actually deletes the e-mail

RE: store JPG in MySQL DB

2002-05-20 Thread Soheil Shaghaghi
Hello everyone. While you are on this subject, can I ask you a question? Is it possible to store sound, or video in the mySQL database? If so, is it wise? Are there any performance issues I should be aware of I just want my users to be able to add their photo, and sound (or maybe a short video)

RAND and MySQL version!

2002-05-14 Thread Soheil Shaghaghi
Hello All, I am running 2 MySQL servers, one on Linux, and the other on FreeBSD. Linux, MySQL version: 3.23.49 FreeBSD, MySQL version: 3.22.32 Problem: The following code runs on the newer version of MySQL, and Linux, but when I run it on the other server, I get sql error. SELECT

Birthday select

2002-04-19 Thread Soheil Shaghaghi
Hi everyone. I have a sql database of users with their birth date (Y/M/D). Can anyone please tell me how I can check whose birthday each day is, and pull them from the database? Thanks, Soheil - Before posting, please

RE: Optimizing the table

2002-04-19 Thread Soheil Shaghaghi
Hi all, A few days ego, I asked the group about the meaning of the Overhead in sql. Some people were nice enough to answer me, and told me I needed to optimize the table. Here is what phpMyAdmin reports on the table: Space usage : Type Usage Data 1,602 KB Index 3,729 KB Overhead 24,718 Bytes

Error in the log files

2002-04-12 Thread Soheil Shaghaghi
Hi all, I recently upgraded to Perl 5.6.1 and ever since I keep getting these errors in my log files on my Linux machine every time the pages that get the data from mysql are accessed: Argument O_RDONLY isn't numeric in subroutine entry at /usr/local/lib/perl5/5.6.1/i686-linux/DB_File.pm line

RE: RE: Help with Tables Please

2002-04-08 Thread Soheil Shaghaghi
version of MySQL server do you use and how did you changed column type? SS In the last episode (Apr 07), Soheil Shaghaghi said: Hi all, I have create the following mysql table, and when I try to add more than 128 rows in the table, I get this error: Duplicate entry '127' for key 1 I have no duplicate

Help with Tables Please

2002-04-07 Thread Soheil Shaghaghi
Hi all, I have create the following mysql table, and when I try to add more than 128 rows in the table, I get this error: Duplicate entry '127' for key 1 I have no duplicate entries in there, and I can not figure out what's going on! CREATE TABLE CMSHOWNREQUIREDFIELDS1 ( FieldID tinyint(4)

RE: Help with Tables Please

2002-04-07 Thread Soheil Shaghaghi
Thanks for the tip Dan, I changed it, but it still gives me the same error. Any other suggestion? -Original Message- From: Dan Nelson [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 07, 2002 7:08 PM To: Soheil Shaghaghi Cc: [EMAIL PROTECTED] Subject: Re: Help with Tables Please

RE: backup databases

2002-04-03 Thread Soheil Shaghaghi
You can try something like this: DateDir=Directory where you want your backups saved print $output-printheader; my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst )= localtime(time); $year = $year + 1900; $mon++;

Help with mysql and cgi

2002-04-02 Thread Soheil Shaghaghi
Hi all, I hope I am not too far off the topic here. I actually need help with cgi, and mysql. Please refer to the this file to see the program itself: http://www.jhanna.com/ExtraPage4.txt What I need to do is to break apart the subroutine, and do some manupulations on it before displaying the

Updating 2 tables using flags

2002-03-31 Thread Soheil Shaghaghi
Hello everyone, I have 2 MySQL tables called ANNOUNCEMENT1, and ANNOUNCEMENT2 CREATE TABLE ANNOUNCEMENT1( AnnouncementID bigint(20) unsigned DEFAULT '0' NOT NULL, Title varchar(250), DatePosted date DEFAULT '-00-00' NOT NULL, Content text, ArchiveDate date, DateShown date DEFAULT

Installing MySQL libraries on Linux

2002-03-29 Thread Soheil Shaghaghi
Hi, I wonder if this is the place to ask this question or not! I have been trying to install DBD::mysql, or any other mysql, or DBD modules from CPAN on my Linux, and FreeBSD servers. I just can't get them to install. The first error that appears is : Can't exec mysql_config: No such file or

Fetching Data based on the day

2002-03-27 Thread Soheil Shaghaghi
Hello everyone. I am trying to extract the data from MySQL based on the month, and day of the item, and post them on a page. Something similar to Today in History Here is a partial list of my table: CREATE TABLE ANNOUNCEMENT ( AnnouncementID bigint(20) unsigned DEFAULT '0' NOT NULL, Title