[PHP-DB] getting database tables

2001-11-12 Thread mike luce

Can someone give me some help on obtaining a list of tables in a database?
Ive had no luck so far because i keep encountering an error which just times 
out the page.

Any help would be welcome.
thanks.

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
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]




[PHP-DB] Updating external DB

2001-11-12 Thread David Tandberg-Johansen

Hello!

I have a MySQL DB on a web server, and I also have a MySQL on my PC. I want
the local machine to connect to the external machine and update the tables
on the external machine.

I have tried to connect true standard way but it doesn't work. Must I use
SOCKETS to connect to the external machine?

The port 3306 is open on the server, so that isn't the problem. Must I
configure MySQL in a special way?

David



-- 
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]




RE: [PHP-DB] SQL query

2001-11-12 Thread Gonzalez, Lorenzo

 Thanks but I think subselect is not possible with MYSQL.

You're right. Here's a MySQL compatible alternative:
 
SELECT 
table1.* FROM table1 
LEFT JOIN table2 ON table1.id=table2.id 
where table2.id IS NULL

From the MySQL manual on sub-selects at:
 
http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html 
 
 

-Original Message- 
From: Pierre 
Sent: Mon 11/12/2001 12:20 AM 
To: Gonzalez, Lorenzo; [EMAIL PROTECTED] 
Cc: 
Subject: Re: [PHP-DB] SQL query



Thanks but I think subselect is not possible with MYSQL.

Pierre

- Original Message -
From: Gonzalez, Lorenzo [EMAIL PROTECTED]
To: Pierre [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, November 12, 2001 1:08 PM
Subject: RE: [PHP-DB] SQL query


 in other RDBMs this is easily done with a subselect - don't
know if it's
 doable in MySQL or not, someone else can confirm, or you can
try it
 yourself...
 
 select * from table1 where table1.id not in (select
table2.id);
 
 -Lorenzo

 -Original Message-
 From: Pierre
 Sent: Sun 11/11/2001 10:01 PM
 To: [EMAIL PROTECTED]
 Cc:
 Subject: [PHP-DB] SQL query



 I have two tables, one call category, the other chapter

 Category table
 [id][name]
 [1][a]
 [2][b]
 [3][c]
 [4][d]

 Chapter table
 [id][FK_name]
 [1][a]
 [2][a]
 [3][c]


 I would like to get the list of names of the Category table
that
 are NOT present in the Chapter table.
 On this example, I should find b and d. 

 Is it possible to get it directly from a SQL query ? (I am
using
 MYSQL).

 Thank for helping me.

 Pierre









[PHP-DB] Windows, MSSQL varchar255 caracters?

2001-11-12 Thread Michael Schmidt

Hi All.

With the Microsoft SQL Server it is possible to make a table with fields of
the type varchar which can have more then 255 characters width.

When use a query to get the content, i only get the first 255 characters all
others are cut off. (i connect to the DB via the mssql_... commands).

Anyone has a idea how to solve the problem?

Michael



-- 
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]




RE: [PHP-DB] Windows, MSSQL varchar255 caracters?

2001-11-12 Thread Jacob Anderson

The VARCHAR(255) bug is actually a limitation imposed by ODBC - so I
suspect the MSSQL library uses ODBC for communication with a SQLServer
installation.  I've experienced the same problem using Java JDBC and some
older SQL Server drivers.  Recent type-4 MS SQL Server drivers for JDBC have
fixed the problem, so no doubt subsequent ODBC implementations will contain
the fix, such as that found in Windows XP.

-- Jake
[EMAIL PROTECTED]

 -Original Message-
 From: Ryan Marrs [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 12, 2001 5:15 AM
 To: 'Michael Schmidt'; '[EMAIL PROTECTED]'
 Subject: RE: [PHP-DB] Windows, MSSQL varchar255 caracters?


 I fixed this issue by using a text field instead of a varchar field.  For
 some reason, it didn't want to read anything over 255 characters, although
 the data was still stored.  Maybe it's a bug, or maybe just a limitation.

 Ryan


 -Original Message-
 From: Michael Schmidt [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 12, 2001 8:12 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Windows, MSSQL varchar255 caracters?

 Hi All.

 With the Microsoft SQL Server it is possible to make a table with
 fields of
 the type varchar which can have more then 255 characters width.

 When use a query to get the content, i only get the first 255
 characters all
 others are cut off. (i connect to the DB via the mssql_... commands).

 Anyone has a idea how to solve the problem?

 Michael



 --
 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]

 --
 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]




-- 
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]




Re: RE: [PHP-DB] Windows, MSSQL varchar255 caracters?

2001-11-12 Thread Frank M. Kromann

The bug as you call it is a limitation in the libraries from Microsoft. SQL Server 
ships with a set of C-Libraries called DBLIB, and these were developed for MSSQL 
Server 4.x and 6.x. In version 7.x Microsoft extended char and varchar column max 
length to 8000 but did not update the DBLIB stuff.

So the MSSQL extension does not use (slow) ODBC to communicate with the server, but 
jus a set of old libraries.

- Frank

 The VARCHAR(255) bug is actually a limitation imposed by ODBC - so I
 suspect the MSSQL library uses ODBC for communication with a SQLServer
 installation.  I've experienced the same problem using Java JDBC and some
 older SQL Server drivers.  Recent type-4 MS SQL Server drivers for JDBC have
 fixed the problem, so no doubt subsequent ODBC implementations will contain
 the fix, such as that found in Windows XP.
 
 -- Jake
 [EMAIL PROTECTED]
 
  -Original Message-
  From: Ryan Marrs [mailto:[EMAIL PROTECTED]]
  Sent: Monday, November 12, 2001 5:15 AM
  To: 'Michael Schmidt'; '[EMAIL PROTECTED]'
  Subject: RE: [PHP-DB] Windows, MSSQL varchar255 caracters?
 
 
  I fixed this issue by using a text field instead of a varchar field.  For
  some reason, it didn't want to read anything over 255 characters, although
  the data was still stored.  Maybe it's a bug, or maybe just a limitation.
 
  Ryan
 
 
  -Original Message-
  From: Michael Schmidt [mailto:[EMAIL PROTECTED]]
  Sent: Monday, November 12, 2001 8:12 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] Windows, MSSQL varchar255 caracters?
 
  Hi All.
 
  With the Microsoft SQL Server it is possible to make a table with
  fields of
  the type varchar which can have more then 255 characters width.
 
  When use a query to get the content, i only get the first 255
  characters all
  others are cut off. (i connect to the DB via the mssql_... commands).
 
  Anyone has a idea how to solve the problem?
 
  Michael
 
 
 
  --
  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]
 
  --
  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]
 
 
 
 
 -- 
 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]
 
 
 




-- 
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]




RE: [PHP-DB] JOIN operations

2001-11-12 Thread Rick Emery

 There isn't the field table_name.ID_city!!!

because you didn't ask for it.  You asked for:
  table_name.name
  table_city.ID
  table_city.city

-Original Message-
From: Carlo Loiudice [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 09, 2001 4:02 PM
To: PHP DB
Subject: [PHP-DB] JOIN operations


Hi,
I'm preforming a join between 2 Mysql tables in this
way:
table_name: ID,name,ID_city
table_city: ID,city

when I query this: 
SELECT table_name.name,table_city.ID,table_city.city
FROM table_name,table_city WHERE
table_name.ID_city=table_city.ID

The result is a new table with this fields:
result_table: name,city.
There isn't the field table_name.ID_city!!!

Here's the question: I need also this field ID_city
because there's a function that builds a list box with
all the cities, and search for a html hidden input
named ID_city (like the table field) to eventually
highlight that entry.

can someone help me?
is there a way to select also the ID_city field
without break the join mechanism ?

Carlo

__

Abbonati a Yahoo! ADSL con Atlanet!
Naviga su Internet ad alta velocità, e senza limiti di tempo! 
Per saperne di più vai alla pagina http://adsl.yahoo.it

-- 
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]



--
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]




RE: [PHP-DB] getting database tables

2001-11-12 Thread Rick Emery

In PHP:
$query = SHOW TABLES;
$result = mysql_query($query) or DIE(Error: .mysql_error());
while( $row = mysql_fetch_array($result) )
{
do some stuff with $row
}


-Original Message-
From: mike luce [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 12, 2001 3:10 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] getting database tables


Can someone give me some help on obtaining a list of tables in a database?
Ive had no luck so far because i keep encountering an error which just times

out the page.

Any help would be welcome.
thanks.

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
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]



-- 
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]




[PHP-DB] is it a Many-to-Many relationship ???

2001-11-12 Thread Carlo Loiudice

HI again.
I'm doing this:
I'm a table where there are 4 fields like this:
height,measure height,weight, measure weight.
Then a 2nd table, where I've all measures defibed.

How can I select 2 different rows from the 2nd
(measures) table related to 1 entry in the 1st table
with a single select query?

Thanks, Carlo

__

Abbonati a Yahoo! ADSL con Atlanet!
Naviga su Internet ad alta velocità, e senza limiti di tempo! 
Per saperne di più vai alla pagina http://adsl.yahoo.it

-- 
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]




RE: [PHP-DB] is it a Many-to-Many relationship ???

2001-11-12 Thread Rick Emery

show us your table structure.  which fields do you want to select on in both
tables
-Original Message-
From: Carlo Loiudice [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 12, 2001 1:15 PM
To: PHP DB
Subject: [PHP-DB] is it a Many-to-Many relationship ???


HI again.
I'm doing this:
I'm a table where there are 4 fields like this:
height,measure height,weight, measure weight.
Then a 2nd table, where I've all measures defibed.

How can I select 2 different rows from the 2nd
(measures) table related to 1 entry in the 1st table
with a single select query?

Thanks, Carlo

__

Abbonati a Yahoo! ADSL con Atlanet!
Naviga su Internet ad alta velocità, e senza limiti di tempo! 
Per saperne di più vai alla pagina http://adsl.yahoo.it

-- 
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]



--
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]




[PHP-DB] Lost Access Logging Out why do you taunt me IE?

2001-11-12 Thread Brian Tegtmeier

Sup all. I'm currently running into a problem (can send source if needed) with this 
news script called PHP-News at http://www.hotscripts.com/Detailed/7145.html where if 
I login to the admin area with Internet Explorer 5 and click on one of the sectional 
links like Users or News I am immediatly presented with a Lost Access Logging 
Out error and it takes me back to the main screen. 

The odd thing is it does it both for IE 5 browsers for PC, Mac OS9, and Mac OSX.. but 
Netscape 4 and 6 on PC and Mac are able to handle it properly. I'm not sure if it is a 
problem with cookies or sessions but for both IE and Netscape I left them at their 
default settings for both. 

I tried to email the author, but there was no response and the website for it isn't 
really informative or give feedback. 

If any of you have tried this script or want to fool around with it, let me know. I 
don't really want to try another news script (this is the best and easiest to use so 
far) so any suggestions would be grand! 

Thanks! :)

-- 

___
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


1 cent a minute calls anywhere in the U.S.!

http://www.net2phone.com/cgi-bin/link.cgi?170


-- 
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]




Re: [PHP-DB] Lost Access Logging Out why do you taunt me IE?

2001-11-12 Thread Raquel Rice

On Tue, 13 Nov 2001 04:30:06 +0800
Brian Tegtmeier Brian Tegtmeier [EMAIL PROTECTED] wrote:

 Sup all. I'm currently running into a problem (can send source if
 needed) with this news script called PHP-News at
 http://www.hotscripts.com/Detailed/7145.html where if I login to
 the admin area with Internet Explorer 5 and click on one of the
 sectional links like Users or News I am immediatly presented
 with a Lost Access Logging Out error and it takes me back to the
 main screen. 
 
 The odd thing is it does it both for IE 5 browsers for PC, Mac
 OS9, and Mac OSX.. but Netscape 4 and 6 on PC and Mac are able to
 handle it properly. I'm not sure if it is a problem with cookies
 or sessions but for both IE and Netscape I left them at their
 default settings for both. 
 
 I tried to email the author, but there was no response and the
 website for it isn't really informative or give feedback. 
 
 If any of you have tried this script or want to fool around with
 it, let me know. I don't really want to try another news script
 (this is the best and easiest to use so far) so any suggestions
 would be grand! 
 
 Thanks! :)

It's the best and easiest ... but it doesn't work nor can you get
support?  Sorry, I use PHP-Nuke.

-- 
Raquel

Often we have no time for our friends but all the time in the world
for our enemies.
  --Leon Uris

  
  

-- 
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]




[PHP-DB] Multiple paragraphs; The trick?

2001-11-12 Thread Jelle Ferwerda


HI all,

Just a week or so ago I started testing PHP and MySQL databases. Testing is over. I 
have figured out the basic controls etc. and it is time for the construction of the 
database and the PhP scripts to get the site up and running. The general layout of the 
database and its tables is more or less clear to me, except for one important point, 
for which I would like some advise..

How do you generate multiple paragraphs as output, if they do not have specific 
characteristics. 
Say: I am building a database about a sensor, and this page covers like 2 pages of A4 
text. Obviously I'd like to make more then one paragraph and add some layoutimagery 
between paragraphs. How do you put it in a database? (Say: Like this message: The 
sender is me, the subject is multiple paragraphs, so you should be able to select the 
message. How do you get the formatting in different paragraphs, since it is not with a 
specific title, intro paragraph, main text and footer text). Any number of paragraphs 
and images is possible, so I cannot just create a field for each paragraph. 

Do you put all text as one entry in one field, with HTML to format the paragraphs? I 
think it would work, but it doens't seem like it is THE solution..

Or should I add a table in which you put the paragraphs, which you select through your 
main database, and then sort by paragraph number?

Like:

Table sensors
[Sensor][compagny][country]..[sensor_ID]

Table Contents
[Sensor_No][Para_No][Content]

The answer is probably obvious to you, but for a newbie like me... My database-design 
book is unfortunatey not made for building databases for the web, and do not explain 
this sort of structures. Unfortunately: SQL queries fail miserably in my brain.. 
Probably need a mental upgrade here..

Hope you can help!

Thanks,

Jelle.


-- 


**
Ir. Jelle G. Ferwerda
**
Mankind:
Intelligent enough to make a strong impact on the environment,
But not strong enough to make an intelligent one!
**




[PHP-DB] Getting first character?

2001-11-12 Thread Matt C

I have numbers stored in a text field in my database:

ie.

321
322
401
402
403
404
405
406

I think you get the picture ;) Anyway I need to know how to get just the 
first character of each stored number and store it in the variable $season.

Any help much appreciated, thanks in advance,

Matt

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
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]




RE: [PHP-DB] getting database tables

2001-11-12 Thread Beau Lebens

or even

mysql_list_tables()

:)

/beau

// -Original Message-
// From: Rick Emery [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, 13 November 2001 1:47 AM
// To: 'mike luce'; [EMAIL PROTECTED]
// Subject: RE: [PHP-DB] getting database tables
// 
// 
// In PHP:
// $query = SHOW TABLES;
// $result = mysql_query($query) or DIE(Error: .mysql_error());
// while( $row = mysql_fetch_array($result) )
// {
//  do some stuff with $row
// }
// 
// 
// -Original Message-
// From: mike luce [mailto:[EMAIL PROTECTED]]
// Sent: Monday, November 12, 2001 3:10 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] getting database tables
// 
// 
// Can someone give me some help on obtaining a list of tables 
// in a database?
// Ive had no luck so far because i keep encountering an error 
// which just times
// 
// out the page.
// 
// Any help would be welcome.
// thanks.
// 
// _
// Get your FREE download of MSN Explorer at 
http://explorer.msn.com/intl.asp


-- 
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]



-- 
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]

-- 
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]




Re: [PHP-DB] Getting first character?

2001-11-12 Thread PHPGalaxy.com

Hey Matt..you would use the substr function for this...for example:
$stuff = the number you're checking..
$fnum = substr($stuff, 0, 1)

and $fnum is the first number (as a string) from $stuff  =)

 - Tim


--
From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/



-- 
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]




[PHP-DB] Date calculation

2001-11-12 Thread Ben S.
How do you get the date that is 14 days from today's date.
I am using PHP4 and MySQL. I can get that date with MySQL monitor but php. I
have tried many things but nothing works.
Does anyone give me a help?

Thank you.
Ben



-- 
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]


[PHP-DB] Date Calculation

2001-11-12 Thread Ben S.
How do you get the date that is 14 days from today's date?
I can get that date with mysql monitor but PHP. I am using PHP4 and MySQL. I
have tried many things but nothing works.
Does anyone give me a help?

Thank you.
Ben



-- 
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]


RE: [PHP-DB] Date Calculation

2001-11-12 Thread Beau Lebens
in PHP, coming out in yyy-mm-dd

date("Y-m-d", mktime(0,0,0, date("m"), date("d")+14, date("Y"));

untested, so please test it - this will ignore hours, minutes, seconds (the
leading 3 0's) and make a timestamp using mktime for this month, this day +
14, this year, then return it formatted as yyy-mm-dd

HTH

Beau



// -Original Message-
// From: Ben S. [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, 13 November 2001 1:49 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Date Calculation
// 
// 
// How do you get the date that is 14 days from today's date?
// I can get that date with mysql monitor but PHP. I am using 
// PHP4 and MySQL. I
// have tried many things but nothing works.
// Does anyone give me a help?
// 
// Thank you.
// Ben
// 
// 
// 
// -- 
// 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]
// 

-- 
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]


[PHP-DB] It doesn't cost you anything, why not try it!

2001-11-12 Thread Saint

  You will find the Legal Info at the bottom


RE: PayPal Account

This is something that I wouldn't normally even look at, except that, I read
an article in the Wall Street Journal about PayPal and x.com.

There have been other articles written about these companies in other well
recognized journals. Because I'm a member of PayPal, I knew that this was
real and would work.

If you need to make a few thousand dollars REALLY FAST, then please 
take a
moment to read this simple program I'm sharing with you.

THIS IS THE FASTEST, EASIEST PROGRAM YOU WILL EVER 
DO!!!

Complete it in one hour and you will never forget the day you first received
it!!!

Oh! Did I say FAST? The speed of the internet-type fast. The Newsletter
and all payments are made on the Internet by E-Mail. NEED PROOF? 
Here are
just two testimonials from individuals who decided to invest nothing more
than a little of their time.

Testimonials from:
**
Tony Stevens, Vandenberg AFB, CA:
Hey! I got your e-mail! YOU ROCK! I sent it to all of our frat
brothers.and while I haven't seen my $20 grand yet,
I'm up to $8,285. Hook me up when you run this program again.

Mary Gathers, Columbia, SC:
Hey cuz! This is Mary. I only have one thing to say to you...OH MY GOD! 
I
sent 20 e-mails out like you said and went on vacation. When I got back, 
my
account was up to over $12,000! I owe you!

GETTING STARTED.
The very first thing you need to do is go to PayPal and sign up. It takes
two minutes and PayPal will deposit $5.00 in your account. That makes this
program FREE!

Here's the link: 
https://www.paypal.com/refer/pal=jmj.cornelius%40chello.nl

BE SURE TO SIGN UP FOR A PREMIER ACCOUNT! OR YOU'LL 
BE LIMITED TO $100
DOLLARS ONLY!!! YOU WILL MAKE MUCH MORE THAN 
THIS!!!

Then.. E-Mail the $5.00 from your PayPal account to the FIRST name 
on
the list (#1) along with a little note like Please add me to your mailing
list. BE PREPARED TO GET EXCITED YOU WON'T BE 
DISAPPOINTED!!!

Read the following and you will agree this is a very exciting opportunity.

ARE YOU IN NEED OF MONEY RIGHT NOW? HOW DOES 
$20,000 IN TWO WEEKS SOUND?

Don't laugh! Try this for a change while you wait for the others to start
working. One hour of work to get started and no mailing lists! This service
is 100% legal (refer to US Postal and Lottery Laws, Title 18,Section 1302
and 1341, or Title 18, Section 3005 in the US code, also in the code of
Federal Regulations,Volume 16, Sections 255 and 436, which state a 
product
or service must be exchanged for money received).

Here's How It Works. Unlike many other programs, this THREE LEVEL 
PROGRAM is
more realistic and much, much faster. Because it is so easy, the response
rate for this program is VERY HIGH VERY FAST -- Internet E-Mail
FAST -- and you will see results in two weeks or less! JUST IN TIME 
FOR NEXT
MONTHS BILLS!

You only mail out 20 copies (not 200 or more as in other programs). You
should also send them to people who send their programs, because they 
know
these programs work and they are already believers in the system! Besides,
this program is MUCH, MUCH FASTER and has a HIGHER 
RESPONSE RATE! Even if
you are already in a program, stay with it, but do yourself a favour and DO
THIS ONE as well.

START RIGHT NOW! It's simple and takes NO INVESTMENT! It will 
pay off long
before others letters even begin to trickle in!

Just give ONE person a $5.00 gift (REMEMBER THOUGH, this $5.00 is 
$5.00 YOU
GOT FREE WHEN YOU SIGNED UP FOR THE PayPal account). 
That's all! If you
already have a PayPal account and do not receive their $5.00 gift, feel free
out of the goodness of your HEART to donate a $5,00 GIFT to the person 
in
the number 1 spot for him to have your name added to the advertisement 
list.
So anyone's MAXIMUM INVESTMENT IS $5.00.

Follow the simple instructions and in two weeks you will have $20,000 in
your bank account! Because of the ZERO INVESTMENT, SPEED, and 
HIGH PROFIT
POTENTIAL, this program has a VERY HIGH RESPONSE RATE! 
FROM just
ONE $5.00 bill that you get FREE at PayPal!!!

Follow These Simple Instructions:

E-Mail the $5.00 from your Paypal account to the FIRST name on the list
(#1)along with a note saying add me to your mailing list. Only the first
person on the list gets your name and five dollar gift. Edit only the list,
removing the FIRST (#1) NAME FROM THE LIST. Move the other two 
names UP and
ADD YOUR NAME to the list in the THIRD (#3) position.

Don't try to add your name in the first place in order to earn money fast!
If you do that, you will ONLY reach people you sent e-mail to and then 
your
name will be immediately removed from the first place and you can't reach
more people! But if you add your name on the 3rd place, there will be tons
of people receiving E-Mails with your name first later!!!

NOTE: Do not forget to replace the PayPal referring URL in the body of 
the
letter with your own 

[PHP-DB] RE: PHP/MySQL Question

2001-11-12 Thread Tim Ward

Use sql keyword LIKE, unless you have access to the design of the database,
in which case design it properly (i.e. something approaching normal form). 

Tim

--
From:  Peter Brown [SMTP:[EMAIL PROTECTED]]
Sent:  12 November 2001 05:28
To:  [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject:  PHP/MySQL Question

HI, 

New to PHP/MySQL,

I was wondering if this was possible.

I have a users database with an auto-incremented userID field.

I have another message database (it's a message board database) -
one of
the fields is a TEXT field with userIDs separated by carriage
returns;
eg; if on one record userID 2 and userID 4 have both viewd that
record,
the data in that field will look as follows:

2
4

I want to construct a SQL query for every user that logs in (I am
storing their userID as a session variable) so that I can filter out
any
messages where a user has already viewed that record.  So in the
above
example that record should be filtered out if user 2 or user 4 has
viewed the record.

The query I constructed is:

SELECT * FROM messages WHERE userID != '$userid'

But this will not filter out any records like the one above where
the
userID in the message database is separaed by carriage returns as
above
(ie; it won't filter out messages for user 2 or user 4).

Hope this makes sense
Peter


-- 
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]




[PHP-DB] Re: PHP/MySQL Question

2001-11-12 Thread Julio Nobrega Trabalhando

  LIKE is a very good option. You can use:

LIKE \n'$id'\n;

  Or similar, where \n stands for the Mysql carriage return 'symbol'.

  Also, you may try selecting the whole text field, explod()ing contents by
carriage returns and checking with in_array() for the id if the above
doesn't works.

--

Julio Nobrega

A hora está chegando:
http://toca.sourceforge.net
Peter Brown [EMAIL PROTECTED] wrote in message
002401c16b3a$c51382f0$850ca8c0@peter">news:002401c16b3a$c51382f0$850ca8c0@peter...
 HI,

 New to PHP/MySQL,

 I was wondering if this was possible.

 I have a users database with an auto-incremented userID field.

 I have another message database (it's a message board database) - one of
 the fields is a TEXT field with userIDs separated by carriage returns;
 eg; if on one record userID 2 and userID 4 have both viewd that record,
 the data in that field will look as follows:

 2
 4

 I want to construct a SQL query for every user that logs in (I am
 storing their userID as a session variable) so that I can filter out any
 messages where a user has already viewed that record.  So in the above
 example that record should be filtered out if user 2 or user 4 has
 viewed the record.

 The query I constructed is:

 SELECT * FROM messages WHERE userID != '$userid'

 But this will not filter out any records like the one above where the
 userID in the message database is separaed by carriage returns as above
 (ie; it won't filter out messages for user 2 or user 4).

 Hope this makes sense
 Peter




-- 
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]