- 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 for
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,
(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
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!
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 stationery
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
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
frustrated..
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
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
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,
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
?
Mysql_connect($server,$user,$pass);
Mysql_select_db($database);
$sql = SELECT companyid,companyname FROM companies ORDER BY companyname
ASC;
$result = mysql_query($sql);
$num = mysql_num_rows($result);
if ($num) {
while($row = mysql_fetch_array($result)) {
print
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
- 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 ideas? i tried
$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
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
?
$a=1;
$flag = 0;
$test = (a==1) OR (b==1);
$string = if($test){ $flag =1;};
var_dump($string);
eval($string);
if( $flag ==1 ) {var_dump($a);}
?
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
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
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
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
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 my
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
Hello again,
Is there oportunity to write this:
some php command to loop entries, the way is written bellow
HTML php coding.+ MYSQL - 1 entries information
end of loop
Something like that:
here loop begins
table
tr
td
first entry information from table companies (name, telephone...)
/td
/tr
Something like:
? for($i=1; $i25; $i++) { ?
table
tr
td
?
// php code to output your entry information
?
/td
/tr
/table
? } ?
Andrius Jakutis wrote:
Hello again,
Is there oportunity to write this:
some php command to loop entries, the way is written bellow
HTML php coding.+ MYSQL
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...
I
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:
? for($i=1; $i25; $i++) { ?
table
tr
td
?
// php code to output your
I think what you want is
?php
$query = Select * from companies;
if( !($dbq = mysql_query($query,$dblink)))
{
echo Error querying database.;
exit;
}
while( $row = mysql_fetch_array ($dbq) ) {
?
table
tr
td
?php
// php code to output your entry information
?
/td
/tr
/table
? } ?
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 TABLE;
while( $row = mysql_fetch($result)
{
print
TRTD.$row['field1'].TD.$row['field2'].TD.$row['field3']./TR
;
}
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 TABLE;
while( $row =
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, 2001 11:50
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
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:
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 $now
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
problems.
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)
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 \
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 it as a
43 matches
Mail list logo