- Original Message -
From: Arcadius A. <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 9:28 PM
Subject: [PHP-DB] MySQL DB CleanUp Help!
> Hello !
> I'd like to automatically delete old entries from my MySQL
> Is there any special funcion in PHP or MySQl f
Do you know What's a logo worth: PRICELESS.
Do you have a logo ?
Do you have what it takes to design one ? To do it in Flash ?
Do you heve what it takes to put it on your website ? on your stationery & Business
card ? On literally hundreds of products ?
Do you have what it takes to make it 3D, A
(Apologies for cross-postings here but I lost a php-db list members personal email
address..)
I need a query that in English would read something like:
"Select all records from table: 'items' where each record is displayed for 7days after
it's
submission."
It was suggested I may have to modi
This should work:
SELECT * FROM items WHERE TO_DAYS(NOW()) - TO_DAYS(submitDate) <= 7;
> -Ursprungligt meddelande-
> Fran: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]For Russ Michell
> Skickat: den 23 augusti 2001 11:46
> Till: Gremlins Mailing List
> Kopia: [EMAIL PROTECTED]
> Amne: Re
Thanks for that - but I just sorted it literally 10 seconds ago! I used:
$sql = "SELECT * FROM $tabitem WHERE DATE_ADD(submitDate, INTERVAL 8 DAY) > CURDATE()";
Something happens with using INTERVAL 7 DAY though, in that only 6 days worth of posts
are
displayed, so 8 will have to suffice!
Tha
"Wisam" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Do you know What's a logo worth: PRICELESS.
> Do you have a logo ?
> Do you have what it takes to design one ? To do it in Flash ?
> Do you heve what it takes to put it on your website ? on your stationer
hello,
i have hit a major stumbling block and am now getting really
frustrated.. if someone could point me in the right direction i would
really appreciate it..
- i have a set of forms across a number of pages
- the user enters data into each of the forms and these are placed in a
session vari
Check the socket specified in the configuration file, and make sure it
exists, I forget the details exactly, but I had the same problem, and the
directory which it tried to create the socket wasn't in the directory it was
looking for it. I just created a symbolic link to it, and it works.
Ryan
Try
$link = addslashed($HTTP_SESSION_VARS["HREF"])
and then use $link in the sql insert
and..
stripslashes(query result)
when you retrieve the value and need to display it on the page.
hth
andre
brendan wrote:
> hello,
> i have hit a major stumbling block and am now getting really
> frustrat
cheers andre
i tried that too..
and while i can get it to work by extracting with stripslashes i was
trying to enter the '.' itself ..
when i see the entry in myphpadmin it is still a '@'
thanks tho..
brendan
Andre P. wrote:
> Try
>
> $link = addslashed($HTTP_SESSION_VARS["HREF"])
> and then
Or of course one could compile PHP as a standalone and simply cron the
script itself.
No matter how PHP is invoked, though, IMHO scripts like this that require
no human interaction should be a bit more robust than interactive systems.
For example, one would probably want to code it to make sure t
What's a spammer worth? Nothing.
-Original Message-
From: Wisam [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 7:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] It's just a logo..
Do you know What's a logo worth: PRICELESS.
Do you have a logo ?
Do you have what it takes to d
Thanks,
We've also discovered something else interesting. Even though the Oracle server
and the web server are both running Solaris 2.8, the web server is an older
version and does not have the same libraries as the newer version. We'll correct
that and see how your suggestion works.
Tom Tsongas
Hi all,
I just built a news database for my site.
I want to give the visitor ability to browse my news
database. Problem is how to determine the next or
previous news id for the current news she is reading,
so I can give link(s), such as "PREVIOUS" and/or "NEXT" if there is any.
I'm using MYSQL f
list($prev_id)=mysql_fetch_array(mysql_query("SELECT news_id FROM
newsTable WHERE news_id<$current_id LIMIT 1;"));
list($next_id)=mysql_fetch_array(mysql_query("SELECT news_id FROM newsTable
WHERE news_id>$current_id LIMIT 1;"));
if (!$next_id) { // no next id
// kldjlsjkdf
}
But keep in mind
Robert,
iODBC is available for free, and as source.
This will let you use any ODBC driver, after you compile PHP --with-iodbc.
There is a fairly straightfoward HOWTO at http://www.iodbc.org.
OpenLink's drivers are not distributed in source format, but download for
free with a 2-connection licens
Hi,
I can see absolutely no reason to store the name of
the image with the picture?
Why not, whether using one directory or one for each
user, just do id.gif?
Best Regards,
Bill Zeller
--- Steve Brett <[EMAIL PROTECTED]> wrote:
> that would generally work on the assumption that
> many photos ca
Try
$file_content = implode('',file($path_and_name_of_file));
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%
- Original Message -
From: "Jack" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 6:02 PM
Subjec
Gabe,
ODBC does not require IPX. It's a layer above and dosn't care.
Creating a DSN in your odbc.ini on the linux box (after building
PHP --with-iodbc) should work fine.
Check out the HOWTO at www.iodbc.org.
Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software http://w
Joachim,
Are you using OpenLink drivers?
If so, please verify if you can run the query using the OpenLinkODBC SDK
sample "odbctest" application. If you can, then this issue is specific to
PHP. Please trace this from the $ODBCINI file via
[ODBC]
Debugfile=/tmp/odbc.out
You can reply with the
Adam,
If you want to use ODBC, compile PHP --with-iodbc as per the HOWTO at
www.iodbc.org, and then install the Multi-Tier drivers from
www.openlinksw.com. Follow the "Product Availability" link there to obtain
the correct components.
If you require assistance, free support is available at
http
I thought I might advertise my own new line of products: Half-eaten Viagra.
Do you have some troubles with you-know-who?
Do you want me to take care of it for you?
I thought not, and thats why this half-eaten Viagra will do at least half
the job. If you can't handle the rest of the job, then maybe
just using id.gif immediately becomes problematic as each user is, by
design, going to have multiple images. I know you could add a count
to id, or mangle it, or any number of other things. But that takes us
back into unnecessary complexity.
Sheridan Saint-Michel
Website Administrator
FoxJet, a
Hello All,
Maybe you can help me, becouse I was searching for various documentations,
and it seems too difucult for me, becouse everything is so crowded.
I need to built small html file, where I could get listed companies.
I have two tables in my MYSQL database, companies and services.
Company
";
print getServices($row[companyid]) . "";
print "";
}
} else {
print "No Companies";
}
Function getServices ($id) {
$sql = "SELECT services FROM services WHERE companyid = $id";
$result = mysql_query($sql);
$num = mysql_num
i want to do something like this:
$string="($a==1) OR ($b==2)";
if ($string) { do something ; }
any ideas? i tried using if (eval($string)) but that just gave me errors.
thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comm
\n";
}
echo "".$ar['services']."";
}
}
mysql_free_result($res);
?>
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%
- Original Message -
From: "Andrius Jakutis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 24, 2001 5:04 AM
Subject: [PHP
- Original Message -
From: Brian Weisenthal <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 24, 2001 1:14 AM
Subject: [PHP-DB] variable if statement
> i want to do something like this:
>
> $string="($a==1) OR ($b==2)";
>
> if ($string) { do something ; }
>
> any idea
$func_body = "return ($a==1 or $b==2)";
$newfunc = create_function('$a,$b',$func_body);
if ($newfunc($first_par,$second_par)){
}
or
if ($newfunc($a,$b,"return (\$a==1 or \$b==2);")){
}
or
if ($newfunc($a,$b,'return (\$a==1 or \$b==2);')){
}
Hope this will help.
Andrey Hristov
eval will work, but the entire thing must be in the eval(). It would look
like:
$flag = 0;
$test = "(a==1) OR (b==1)";
$string = "if($test){ $flag =1;}";
eval($string);
if( $flag ==1 ) {do_something;}
I had to resort to this in a similar situation. I read the condition and
result action in a M
I won't add to the code suggestions already given, but I will share one
thought about your tables - you absolutely _should_ be using two. Any
given company can have from one service to thousands (take GE,
everything from light bulbs to cruise missiles :). The only way to
capture that data effe
Produces:
string(28) "if((a==1) OR (b==1)){ 0 =1;}"
Parse error: parse error in c:/apache/htdocs/test2.php(7) : eval()'d code on
line 1
Why?
Because of using "" instead of '', or if use "" the escape the $
Also there is another problem:
$test = "(a==1) OR (b==1)";
must be
$test = "(\$a==1) OR (\
The most useful schema would be to have the name of the document be system
generated, like i123456789.img and make the database as follows:
Image
Image_Name varchar(50) primary key
Original_Name varchar(50)
Description text
User
User_ID int8 primary key
Login char(8) uniques index
password varch
Actually, it is much better to use three tables in this case. Have the
following tables:
Company table:
companyid and companyname
Services table:
serviceid and servicename
Company2Services table:
companyid and serviceid
Let's say you have three companies:
1 Kleptos Anonymous
2 Solar Sneezers
3
Actually,
He should be using three. While one company could use many services, you
might also have other companies that offer the same service. So there should
be 3 tables to allow a many-to-many relationship. See my e-mail response to
him.
- Jonathan
"Chris Hobbs" <[EMAIL PROTECTED]> wrote in m
I realized that as soon as I hit Send - doh! :)
Jonathan Hilgeman wrote:
> Actually,
> He should be using three. While one company could use many services, you
> might also have other companies that offer the same service. So there should
> be 3 tables to allow a many-to-many relationship. See m
I don't know if having multiple users associated with a single image is
at all beneficial, and I can see where it might cause all sorts of problems.
For example, you and I both have the same image in our album (we are
both assciated with it in the DB). What happens when I change the
description
Hello again,
Is there oportunity to write this:
HTML php coding.+ MYSQL - 1 entries information
Something like that:
first entry information from table "companies" (name, telephone...)
THanks.
--
Su pagarba,
Andrius Jakutis
InternetMedia
http://www.internetmedia.lt
GSM: 370 8
Something like:
Andrius Jakutis wrote:
> Hello again,
>
> Is there oportunity to write this:
>
>
> HTML php coding.+ MYSQL - 1 entries information
>
>
> Something like that:
>
>
>
>
>
> first entry information from table "companies" (name, telephone...)
>
>
>
>
>
>
>
However, the concept of the filename on the drive having nothing to do
with the real original useful filename was the real point. You can then
save whatever type of file you want, point to it, and tell the user on the
other end what to save it as.
I have found Richard Heyes's template class to be very useful for
this sort of thing--he includes functions to parse code surrounded by
tags for an entire MySQL result set. Very handy if you
prefer to separate code and layout. (If anyone is interested, I
wrote a function that extends his cl
Gee thanks. I'll get back to you in about 40 years when this will be useful.
Thanks!
David Balatero
- Original Message -
From: "Jonathan Hilgeman" <[EMAIL PROTECTED]>
To: "PHP-DB (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 8:36 AM
Subject: [PHP-DB] It's just spam...
>
Look at this:
when it gets called, and I do a select in isql, I do not see any of the
records. Only after doing a "manual" commit in isql, I can see the new
data.
How is that possible?
yves
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For add
This gives 25 the same entries. I need to list all entries from the table,
but with loop.
More solutions?
"Chris Hobbs" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Something like:
>
>
>
>
>
> // php code to output your entry information
> ?>
>
>
I think what you want is
Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com
- Original Message -
From: "Andrius Jakutis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 11:22 PM
Subject: Re: [PHP-DB] listing
> This g
Assuming you've opened a MySQL connection and stored connection in $connect:
$query="SELECT * FROM mytable";
$result = mysql_query($query,$connect) or die("ERROR");
print "";
while( $row = mysql_fetch($result)
{
print
"".$row['field1']."".$row['field2']."".$row['field3']."
";
}
print "";
Okay, but what if I want to use data from two tables not only from
"companies" ?
> Assuming you've opened a MySQL connection and stored connection in
$connect:
>
> $query="SELECT * FROM mytable";
> $result = mysql_query($query,$connect) or die("ERROR");
>
> print "";
> while( $row = mysql_fet
Then your select might look like:
SELECT * FROM tableA, tableB
or
SELECT * FROM tableA LEFT JOIN tableB USING(field1)
Depends upon what you're trying to do. So far, your requirements have been
rather vague.
-Original Message-
From: Andrius Jakutis [mailto:[EMAIL PROTECTED]]
Sent:
Then you start reading =)
http://www.mysql.com/doc/
Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com
- Original Message -
From: "Andrius Jakutis" <[EMAIL PROTECTED]>
To: "Rick Emery" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 20
Newbie question.
I've been developing web application in IIS using ASP and Microsoft SQL
Server 7.0.
I use "Stored Procedures" quite extensible is there an equivalent in MySQL
Thanks.
Francisco Carvalho
no
-Original Message-
From: Francisco Carvalho [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 23, 2001 4:20 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] Store Procedures
Newbie question.
I've been developing web application in IIS using ASP and Microsoft SQL
Server 7.0.
I use "Sto
Hello,
I'm new with PHP and PostgreSQL, and can't find a solution to the
following problem. I'd like to combine multiple SQL commands into one
pg_exec call. For example, I've tried "delete ...; insert ...; insert
...;" with the appropriate values in the "...", but I'm receiving this
error
I am extremely stuck with trying to do two things.
1) I would like to pull all entries out of a table that have dates that
haven't occured yet. Basically forget anything before the current day. How
do I do that?
2) I enter news into a table and would like to display a summary page.
Basically
"Matt C" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 1) I would like to pull all entries out of a table that have dates that
> haven't occured yet. Basically forget anything before the current day. How
> do I do that?
DELETE FROM table WHERE timestamp > $n
"Sheridan Saint-Michel" <[EMAIL PROTECTED]> wrote in message
03a901c12c02$c60d4640$[EMAIL PROTECTED]">news:03a901c12c02$c60d4640$[EMAIL PROTECTED]...
> I don't know if having multiple users associated with a single image is
> at all beneficial, and I can see where it might cause all sorts of
prob
I am using this code to connect to my database and insert form data from a
user:
$connect = mysql_connect("myhost","user","pass") or die (" not connected");
@mysql_select_db("dbname");
$sql="INSERT INTO tablename
(id,first,last,age,email,sfuser,sfship,icq,ac,loca,ref)
Values(,`$first`,`$last`,'$a
I successfully compiled PHP to connect to MS SQL 2000 this way:
1. Get "FreeTDS" (free version of Table Data Stream protocol driver) and install it.
2. Configure installed file "interfaces" (see doc of FreeTDS), you need just name your
connection to SQL
3. Configure PHP with --with-sybase option
no!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hello guys
My server was running php4.0 just fine, but I needed to use some new
features, so I decided to upgrade to the latest one (php4.06). I followed
the normal procedure:
./configure \
--with-apxs=/usr/local/apache/bin/apxs
--enable-ftp \
--with-mysql \
--with-dbase \
--with-imap
Copied the .so file into the right location? Restarted apache? First two
things I'd check.
Justin Buist
Trident Technology, Inc.
4700 60th St. SW, Suite 102
Grand Rapids, MI 49512
Ph. 616.554.2700
Fx. 616.554.3331
Mo. 616.291.2612
On Thu, 23 Aug 2001, [iso-8859-1] Wilmar Pérez wrote:
> Hello
Jack,
You just need to check out the fopen and fread functions on php.net/manual
Angie Tollerson
Alliance Technologies
Web Programmer
(515)245-7628
[EMAIL PROTECTED]
>>> "Jack" <[EMAIL PROTECTED]> [EMAIL PROTECTED] 10:02AM >>>
Dear all
Actually i'm trying to get the content of a file, and make i
Dear all
Actually i'm trying to get the content of a file, and make it as a default
value of a input text column.
Is there anyway could do it?
Thx
jack
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mai
62 matches
Mail list logo