Re: [PHP-DB] MySQL Query not working via PHP

2003-10-17 Thread Matthew Moldvan, Jr.
I would say try single quotes instead of double quotes ... let me know if
that works ...

Regards,
Matt.

- Original Message - 
From: "Sean Smitz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 17, 2003 4:32 PM
Subject: [PHP-DB] MySQL Query not working via PHP


> I have a query that works in MySQL but when I try to execute it in PHP I
> encounter the following error:
>
> //Generated by the script
> Couldn't execute query!
>
> // Generated by MySQL
> MySQL reports: You have an error in your SQL syntax. Check the manual that
> corresponds to your MySQL server version for the right syntax to use near
> 'FROM cadet, cadet_phone WHERE cadet.ssn = cadet_phone.ssn AND (
>
> //Query outputted by the script
> Query was: SELECT cadet.rank, cadet.lname, cadet.fname, cadet.mname,
> cadet.address1, cadet.address2, cadet.city, cadet.state, cadet.zipcode,
> cadet.email, cadet.guardian1, cadet.relation1, cadet.guardian2,
> cadet.realtion2, cadet.photo, FROM cadet, cadet_phone WHERE cadet.ssn =
> cadet_phone.ssn AND (cadet.lname = "Smith" AND cadet.fname = "John" AND
> cadet.mname = "Doe")
>
> Attached is the entire page. Any help is appreciated.
>
> Sean Smitz
>
>
>
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] CONGRATULATIONS You Win

2003-10-10 Thread Matthew Moldvan
So does this mean we all won? lol

On Thu, 2003-10-09 at 18:37, Francis Weeny wrote:
> SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS. 
> ALFONSTRAAT B56, 
> 1002 BS AMSTERDAM, THE NETHERLANDS. 
> TO THE MANAGER 
> FROM: THE DESK OF THE PROMOTIONS MANAGER, 
> INTERNATIONAL PROMOTIONS/PRIZE AWARD DEPARTMENT, 
> REF: OYL /26510460037/02 
> BATCH: 24/00319/IPD 
> ATTENTION: 
> RE/ AWARD NOTIFICATION; FINAL NOTICE 
> We are pleased to inform you of the announcement 
> today,  9th October 2003 of winners of the SUNSWEETWIN PROMO
> LOTTERY,THE 
> NETHERLANDS/ INTERNATIONAL, PROGRAMS held on 28th August 2003
> 
> Your company,is attached to ticket number 
> 023-0148-790-459, with serial number 5073-11 drew 
> the lucky numbers 43-11-44-37-10-43, and consequently 
> won the lottery in the 3rd category. 
> You have therefore been approved for a lump sum pay 
> out of US$5,500.000.00 in cash credited to file REF 
> NO. OYL/25041238013/02. This is from total prize money
> of 
> US$80,400,000.00 shared among the seventeen
> international winners in
> this category. All participants were selected through
> a computer 
> ballot
> system drawn form 25,000 names from Australia, New 
> Zealand, America, Europe, North America and Asia as
> part of 
> International Promotions Program, which is conducted 
> annually. 
> CONGRATULATIONS! 
> Your fund is now deposited with a Security company 
> insured in your name. Due to the mix up of 
> some numbers and names, we ask that you keep this
> award strictly 
> from 
> public notice until your claim has 
> been processed and your money remitted to your
> account. 
> This is part of our security protocol to avoid 
> double claiming or unscrupulous acts by participants
> of 
> this program.  
> We hope with a part of you prize, you will 
> participate in our end of year high stakes US$1.3
> billion 
> International Lottery. 
> To begin your claim, please contact your claim 
> agent; Mr Francis weeny at this email address below.
> [EMAIL PROTECTED]
> For due processing and remittance of your prize 
> money to a designated account of your choice. 
> Remember, all prize money must be claimed not later 
> than19th October 2003. After this date, all funds will 
> be returned as unclaimed. 
> NOTE: In order to avoid unnecessary delays and 
> complications, please remember to quote your 
> reference and batch numbers in every one of your 
> orrespondences with your agent. 
> Furthermore, should there be any 
> change of your address, do inform your claims agent 
> as soon as possible. 
> Congratulations again from all our staff and thank 
> you for being part of our promotions program. 
> 
> Sincerely, 
> Clark Wood
> THE PROMOTIONS MANAGER, SUNSWEETWIN PROMO LOTTERY,THE
> NETHERLANDS.
> NB. Any breach of confidentiality on the part of 
> the winners will result to disqualification. 
> SORRY FOR THE LATE INFORMATION THANKS 
> CLARK  WOOD
> 
> 
>  
-- 
Matthew Moldvan <[EMAIL PROTECTED]>
Trilogy International, Inc.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] % operator

2003-08-14 Thread Matthew Moldvan
There's probably a better way to do this, but to retrieve only the 0.8 from
24/5 try this:

($a/$b)-floor($a/$b)

Regards,
Matt.

-Original Message-
From: Alain Barthélemy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 5:05 AM
To: php-db
Subject: [PHP-DB] % operator


Hello,

If you have

$a = 24;
$b = 5;

and

$c = $a/$b;

===> $c = 4.8

To retrieve the .8 (reste in french) I saw instruction:

$a%$b

Where can I find a manual for this '%' operator? Of course I already looked
in
all the Php manuals (operators, etc ...).

Thanks,



-- 
Alain Barthélemy
[EMAIL PROTECTED]
http://bartydeux.be
Linux User #315631


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] % operator

2003-08-14 Thread Matthew Moldvan
Well, it looks like your previous response was correct, but $a%$b in this
case returns 4, not the 0.8 as intended ... fmod($a, $b) (I have php 4.1.2,
so I can't test fmod()) will probably return 0.8 though.

As a side note, this message seems a little off-topic ... though it is PHP,
it has nothing to do with databases. :)

Regards,
Matt.

-Original Message-
From: Andrew D. Luebke [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 3:04 PM
To: 'Alain Barthélemy'; php-db
Subject: RE: [PHP-DB] % operator


Although now that I look at: 
http://us4.php.net/manual/en/language.operators.arithmetic.php

You'll see that $a % $b resturns the modulus so that is probably the
easiest.

Andrew,

At 11:43 AM 8/12/2003, you wrote:

>There's probably a better way to do this, but to retrieve only the 0.8 from
>24/5 try this:
>
>($a/$b)-floor($a/$b)
>
>Regards,
>Matt.
>
>-Original Message-
>From: Alain Barthélemy [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, August 12, 2003 5:05 AM
>To: php-db
>Subject: [PHP-DB] % operator
>
>
>Hello,
>
>If you have
>
>$a = 24;
>$b = 5;
>
>and
>
>$c = $a/$b;
>
>===> $c = 4.8
>
>To retrieve the .8 (reste in french) I saw instruction:
>
>$a%$b
>
>Where can I find a manual for this '%' operator? Of course I already looked
>in
>all the Php manuals (operators, etc ...).
>
>Thanks,
>
>
>
>--
>Alain Barthélemy
>[EMAIL PROTECTED]
>http://bartydeux.be
>Linux User #315631
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] silly problem

2003-07-22 Thread Matthew Moldvan
Because you forgot a $ before $sql in the second?

Regards,
Matthew Moldvan
 
System Administrator
Trilogy International, Inc.


-Original Message-
From: Patrik Fomin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 22, 2003 4:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] silly problem



  $sql = "UPDATE dagensfraga SET nej = '$nej' WHERE id = '$iid' AND
aktuellfraga = '1'";
  mysql_query($sql);
 $sql = "INSERT INTO dagensfragaip (aid, ip) VALUES('$iid',
'$REMOTE_ADDR')";
 mysql_query(sql);

when i run this only the first line is recorded into the databse?,
when i run the second line in a mysql_prompt it adds just fine, so why
dosent it add when the script runs?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Very confused with query

2003-07-07 Thread Matthew Moldvan
Hi Robin,

I think you are not using DISTINCT correctly ... try SELECT DISTINCT
whatever instead of the ()s.  Also, the use of * and DISTINCT together
really makes no sense ... in the SQL, you are saying select only one record,
then select everything, which are opposites.

Don't mean to be rude, but I recommend picking up a good book on database
theory. :)

Regards,
Matthew Moldvan
 
System Administrator
Trilogy International, Inc.

-Original Message-
From: Sparky Kopetzky [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 05, 2003 12:20 PM
To: PHP DB Group
Subject: [PHP-DB] Very confused with query


Good morning!!

I'm trying to select 1 and only one record from each user based on the last
date from a transaction file. This is what I'm using and it's not even
close. It seems DISTINCT does not work!!

SELECT DISCTINCT(transaction_user_id), MAX(transaction_date), * FROM
transaction;

Could some kind soul help me figure this one out??

Robin E. Kopetzky
Black Mesa Computers/Internet Services
www.blackmesa-isp.net


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Testing code

2003-07-02 Thread Matthew Moldvan
Yes, but it can be complicated ... you have to install MySQL (www.mysql.com)
and PHP (www.php.net) and web server software, such as Apache
(www.apache.org).

I recently setup a test server on Windows XP with little trouble ...

Good luck!

Regards,
Matthew Moldvan
 
System Administrator
Trilogy International, Inc.


-Original Message-
From: Hugh Dickinson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 6:07 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Testing code


Is it possible to test PHP and MySQL scripts and databases without being
registered on a web server?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] T_String?

2003-06-11 Thread Matthew Moldvan
The function mysql_query() expects a string, so you have to put "select ..."
in quote for it to be considered one string, instead of 4.

Have fun,
Matt.

-Original Message-
From: Jorge L. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 10:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] T_String?


I am getting the following error:
Parse error: parse error, unexpected T_STRING in C:\Program Files\Apache 
Group\Apache2\htdocs\view.php on line 4

On line:
$result = mysql_query(select * from guestbook) or die (mysql_error());

And I have no idea where the T_STRING is coming from. I know this is 
probably some little detail that I am over looking, but I would appreciate 
any help.

_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Help Please!! Oracle/PHP connection

2003-06-10 Thread Matthew Moldvan
Have you tried the built in Oracle functions in PHP?

http://us3.php.net/oracle

oracle_logon() may be useful here ...

Let me know if it works out for you.

Regards,
Matt.

-Original Message-
From: Y Al Hinai [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 8:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Help Please!! Oracle/PHP connection


Hey guys,
 
I would really appriciate it if someone can direct me with this problem.
 
On my laptop I have:  Windows XP Professional, Oracle 9i Database, Oracle
Client Software, PHP4.3.1, and Apache server.
 
PHP and Apache work fine.  Oracle i9 by itslef works fine too.  However when
i tried to connect from PHP to Oracle using the following code:
 
---Code Start-
";
exit;
  }
else  {
echo  "Connection  successful\n";
  }
odbc_Close($conn);
?>
Code End--
 
I get the following error:
 
xxError Start 
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified, SQL state IM002 in SQLConnect in
C:\Documents and Settings\Administrator\My Documents\php\project\php14.tmp
on line 5
conn: Error in connection
xxError End 
 
I have already set up the ODBC by going to Administrative Tools -> Data
Sources (ODBC) -> User DSN -> and added an "Oracle in OraHome92" driver for
my database.
 
Please help me out guys.  This is for my Master's Thesis project.
 
Appriciated,
 
Yousef
 
 


-
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Matthew Moldvan
Keep in mind the code I sent is untested ...  and I realized some errors
when I pasted it into a PHP page.  Corrections are below.

As for the line breaks, I've used SQL formatted that way before and it
hasn't cause me any problems.

Regards,
Matt.

Corrections: $sql .= "mformat='$mformat'," should have a trailing ;
 $result = mysql_query($sql) or die('mysql error
#'.mysql_errno.': 'mysql_error()); should have a . before mysql_error());

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 11:42 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Is this query even possible?


Yup, Matthew's right. I definitely forgot the other $sql. = that needs to go
in front of the WHERE clause.

Question for Matthew though:

Is this:
>   $sql .= "UPDATE newdacs";
>   $sql .= "SET emailfwd='$emailfwd',";
>   $sql .= "mformat='$mformat',"
>   $sql .= "filter_code='$filter_code'";

Pretty much the same as this:
> > $sql = "UPDATE newdacs
> > SET emailfwd='$emailfwd',
> > mformat='$mformat',
> > filter_code='$filter_code'";

I mean, the line breaks in the second example won't cause the query to bomb,
will they? I agree that using the $sql .= is cleaner, but the other way
isn't wrong, is it?

Rich

> -Original Message-
> From: Matthew Moldvan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 11:33 AM
> To: 'Susan Ator'; '[EMAIL PROTECTED]'
> Subject: RE: [PHP-DB] Is this query even possible?
> 
> 
> I would say something like the following would work better:
> 
> if($FUNC=="USERPOST" || $FUNC=="MODU")
> {
>   $sql .= "UPDATE newdacs";
>   $sql .= "SET emailfwd='$emailfwd',";
>   $sql .= "mformat='$mformat',"
>   $sql .= "filter_code='$filter_code'";
>   if($FUNC=='USERPOST')
>   $sql .= ", unote='$unote'";
>   $sql .= "WHERE user_id='$user_id'";
> 
>   $result = mysql_query($sql) or die('mysql error 
> #'.mysql_errno.':
> 'mysql_error());
> }
> 
> Try that ... also look into www.php.net under string 
> manipulation for other
> options.
> 
> Regards,
> Matthew Moldvan
>  
> System Administrator
> Trilogy International, Inc.
> 
> -Original Message-
> From: Susan Ator [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 11:18 AM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-DB] Is this query even possible?
> 
> 
> > This is what I am trying to do:
> > 
> > if ($FUNC==("USERPOST") || $FUNC==("MODU")) {
> > $sql = "UPDATE newdacs
> > SET emailfwd='$emailfwd',
> > mformat='$mformat',
> > filter_code='$filter_code'
> > if ($FUNC=='USERPOST') {
> > ,unote='$unote'
> > }
> > WHERE user_id='$user_id'";
> > $set_newdacs_result = mysql_query($sql) or print
> > mysql_error();
> > }
> > 
> > There are several more queries like this which is why I 
> want to avoid
> > duplicating the code since there are only 1 or 2 
> differences between them
> > depending on function call.
> > 
> > This is the error I am getting:
> > 
> > You have an error in your SQL syntax near 'if 
> (USERPOST=='USERPOST')
> > { ,unote='' } WHERE user_id='2'' at line 5
> > 
> > Is what I am attempting possible or am I spinning my wheels?
> > 
> > susan
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Matthew Moldvan
I would say something like the following would work better:

if($FUNC=="USERPOST" || $FUNC=="MODU")
{
$sql .= "UPDATE newdacs";
$sql .= "SET emailfwd='$emailfwd',";
$sql .= "mformat='$mformat',"
$sql .= "filter_code='$filter_code'";
if($FUNC=='USERPOST')
$sql .= ", unote='$unote'";
$sql .= "WHERE user_id='$user_id'";

$result = mysql_query($sql) or die('mysql error #'.mysql_errno.':
'mysql_error());
}

Try that ... also look into www.php.net under string manipulation for other
options.

Regards,
Matthew Moldvan
 
System Administrator
Trilogy International, Inc.

-Original Message-
From: Susan Ator [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 11:18 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] Is this query even possible?


> This is what I am trying to do:
> 
>   if ($FUNC==("USERPOST") || $FUNC==("MODU")) {
>   $sql = "UPDATE newdacs
>   SET emailfwd='$emailfwd',
>   mformat='$mformat',
>   filter_code='$filter_code'
>   if ($FUNC=='USERPOST') {
>   ,unote='$unote'
>   }
>   WHERE user_id='$user_id'";
>   $set_newdacs_result = mysql_query($sql) or print
> mysql_error();
>   }
> 
> There are several more queries like this which is why I want to avoid
> duplicating the code since there are only 1 or 2 differences between them
> depending on function call.
> 
> This is the error I am getting:
> 
>   You have an error in your SQL syntax near 'if (USERPOST=='USERPOST')
> { ,unote='' } WHERE user_id='2'' at line 5
> 
> Is what I am attempting possible or am I spinning my wheels?
> 
> susan

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] forms with php/mysql

2003-06-09 Thread Matthew Moldvan
FYI, you should keep your connection.txt as connection.php so we can't all
read the database password and host and put what we want in it. :)

Regards,
Matt.

-Original Message-
From: Philippe Rousselot [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 4:18 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] forms with php/mysql


done

you can find the files at 

www.alcatorda.com/jcp/test/files.html

and try it at 

www.alctorda.com/jcp/test/enregistrer.php

I am sure it is full of bad codding but it works.

I just have to make it nice now.

Philippe

Le Jeudi 5 Juin 2003 06:15, Peter Beckman a écrit :

> 1. Search the archives, they are here:
http://www.php.net/mailing-lists.php
>
> 2. If you aren't a coder, you probably cannot do what you ask; there
aren't
> any pre-built simple systems that do exactly what you ask.  You could look
> on freshmeat.net or sourceforge.com, but I doubt you'd find what you are
> looking for.
>
> Peter
>
> On Thu, 5 Jun 2003, Philippe Rousselot wrote:
> > Hi,
> >
> > I need for an association to create a form using php/mysql. If I can
> > understand php, I am not a coder, so if someone had the code I need, I
> > would really be greatful.
> >
> > I need :
> >
> > 1. on a page someone identify himself or register to the service using a
> > form where the person enter name, email(username) and password.
> > 2. once registered, the person can access a secured zone containing a
> > form 3. the persone can fill the form, abandon half way and save the
> > result, then come back and have the previously recorded information
> > appearing again.
> >
> > all data need to be in a Mysql database.
> >
> >
> > Thank you very much for your help.
> >
> > Philippe
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
---
> Peter Beckman  Internet
Guy
> [EMAIL PROTECTED]
http://www.purplecow.com/
>
---


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Double Trouble!

2003-05-27 Thread Matthew Moldvan
That makes sense ... guess I shouldn't respond to questions so late at night
and with any bit of alcohol. :P

S.: did you find a workaround?

Regards,
Matt.
x116

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 2:47 AM
To: Matthew Moldvan
Cc: S. Cole; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Double Trouble!


It's calling the mysql_query function that runs a query, not doing 
something with the result it generates.  If doing something with a 
functions result called the function again, then

function foo(){
   echo "Foo called.";
   return 2;
}
$result = foo();
echo $result + 2;

would result in "Foo called.Foo called.4" being outputted, instead of 
"Foo called.4".

Matthew Moldvan wrote:

>Looks to me like you are calling the mysql_query() function twice here:
>
>  
>
>>  $result = mysql_query( $query, $link );  << first
>>  if ( ! $result ) << second
>>   die ( "Unable to Add Payment to Database:
>>
>>
>".mysql_error() );
>
>try this instead:
>
>  
>
>>  if ( !$result=mysql_query($query, $link) )
>>   die ( "Unable to Add Payment to Database:
>>
>>
>".mysql_error() );
>
>Let me know if that works or not ... it should, though.
>
>Regards,
>Matt.
>
>- Original Message -
>From: "S. Cole" <[EMAIL PROTECTED]>
>To: <>
>Sent: Sunday, May 25, 2003 4:04 PM
>Subject: [PHP-DB] Double Trouble!
>
>
>  
>
>>I can't seem to find out why I am getting two copies of the same entry in
>>
>>
>my
>  
>
>>database.
>>
>>===
>>print "Pending Payment - Adding to Database";
>>
>>  $query = "INSERT INTO payments (subscr_id, pmt_date, txn_id,
>>exchange_rate,
>>amt_paid, payment_status, pending_reason, payer_email,
>>
>>
>payer_id,
>  
>
>>payer_status, verify_sign, paypal_fee)
>>
>>VALUES(
>>
>>
>'$subscr_id','$payment_date','$txn_id','$exchange_rate',
>  
>
>'$mc_gross','$payment_status','$pending_reason','$payer_email',
>  
>
>>'$payer_id','$payer_status','$verify_sign','$mc_fee')";
>>
>>  $result = mysql_query( $query, $link );
>>  if ( ! $result )
>>   die ( "Unable to Add Payment to Database:
>>
>>
>".mysql_error() );
>  
>
>>print "Pending payment - Added to Database";
>>===
>>
>>The print statements at the beginning and end only run once.
>>
>>The script is not called from anywhere else.  I don't have any other
>>
>>
>scripts
>  
>
>>running to insert the same info.  When I "//" out the query, nothing is
>>added to the database.
>>
>>I have a very similar script for adding a customer to another datbase and
>>now it's doing the same thing.
>>Could it be possible that I change some sort of setting in mysql?
>>
>>S. Cole
>>
>>
>>
>>--
>>PHP Database Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
>
>  
>

-- 
The above message is encrypted with double rot13 encoding.  Any unauthorized
attempt to decrypt it will be prosecuted to the full extent of the law.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Re: Does Php support Flash files ?

2003-03-19 Thread Matthew Moldvan
I am assuming English isn't your first language.

Yes, fuck is definitely swearing, cursing, or whatever else you would like
to call it.  And yes, it is considered rude in our culture. :D

So there. :)

Matthew Moldvan.
System Administrator
Trilogy International, Inc.
http://www.trilogyintl.com

-Original Message-
From: Edwin Boersma [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 4:55 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: Does Php support Flash files ?


Swearing Well, the word 'fuck' is a bit rude, but I don't think it is 
swearing. But I get the reactions that I was looking for :-)


At 11:34 19-3-03, you wrote:
>Hi Edwin
>
>On Wednesday 19 March 2003 17:21, Edwin Boersma wrote:
> > What the fuck R U doing in my thread??/
> >
> > Rajni Arya wrote:
> > > Hi,
> > >  Does PHP supprots Flash files on Open BSD platform ?
>
>Yes, it's rude to hijack threads. And if you search the archives, I often
>berate people for doing so. BUT there's absolutely no need and no place for
>swearing on a public forum such as this list.
>
>regards
>--
>Jason Wong -> Gremlins Associates -> www.gremlins.biz
>Open Source Software Systems Integrators
>* Web Design & Hosting * Internet & Intranet Applications Development *
>--
>Search the list archives before you post
>http://marc.theaimsgroup.com/?l=php-db
>--
>/*
>When the going gets weird, the weird turn pro.
> -- Hunter S. Thompson
>*/


Edwin Boersma

***
Odos Agiou Polykarpou
84 300 Chora, NAXOS
Greece
T: +30/2285029088
O: +30/2285029093
M: +30/6942250095
E: [EMAIL PROTECTED]
W: http://www.cyclades-info.com
ICQ: 7383148
***


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Re: Real Killer App!

2003-03-12 Thread Matthew Moldvan
Even if the system is working correctly the first couple times, it may go
into an endless loop if you do not specify the right conditions, for any
programming application ...

I am very curious about this project ... is it open source?  If so, I'd be
interested in taking a look at how you implemented it.

Thanks,
Matthew Moldvan.

System Administrator,
Trilogy International, Inc.
http://www.trilogyintl.com/

-Original Message-
From: Nicholas Fitzgerald [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 7:58 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: Real Killer App!


Well, I'm not locking them out exactly, but for good reason. When a url 
is first submitted it goes into the database with a checksum value of 0 
and a date of -00-00.  If the checksum is 0 the spider will process 
that url and update the record with the proper info. If the checksum is 
not 0, then it checks the date. If the date is passed the date for 
reindexing then it goes ahead and updates the record, it also checks 
against the checksum to see if the url has changed, in which case it 
updates.

It does look like it's going into an endless loop, but the strange thing 
is that it goes through the loop successfully a couple of times first. 
That's what's got me confused.

Nick

Nelson Goforth wrote:

> Do you "lock out" the URLs that have already been indexed?  I'm 
> wondering if your system is going into an endless loop?
>
>




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Storing browser stats

2003-03-06 Thread Matthew Moldvan
I would say use JavaScript to gather the information (screen resolution,
browser info, etc) and then store it in a MySQL or similar DB using PHP.  Do
a search for JavaScript and PHP variables to find out how (it involves
populating hidden fields with JS and passing to PHP Scripts AFAIK) ... that
should get you started, at least. :)

Good luck, and for curiosities sake let me know how the project turns out.

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
  http://www.trilogyintl.com/ecommerce/
--- 


-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 6:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Storing browser stats


Is there a method for storing each users browser stats within a database
table.

So everytime someone visits the browser info is gathered and stored as a
unique row in the 'browser' table in the database.

Any advice??

Cheers

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] php and local printing

2003-03-05 Thread Matthew Moldvan
Have you looked into the exec() function?  Maybe exec("lpr something or
other") may work, though I haven't tried it myself ...

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
  http://www.trilogyintl.com/ecommerce/
--- 

-Original Message-
From: Rajesh Fowkar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 12:21 AM
To: PHP-DB Mailing List
Subject: Re: [PHP-DB] php and local printing


On Tue, Mar 04, 2003 at 06:45:54AM -0800, Mark wrote:

>It dopesn't seem like you got an answer to this. 

Spot on. Yours is the first reply.

>To print locally,
>you'll need to use Jscript of something similar on the local end.
>I've only seen this work in IE, but I haven't looked into it too
>deeply. To print to the server, you'll probably need to shell out to
>the OS.

Using javascript window.print() I get the print dialogue box. But what
I needed was I have got a text file which on server I can print using lp
. Similar thing but without any print dialogue box at the
client end.

>
>HTH or at least starts a discussion...

Hope so.

Thank you for the reply.

Peace

--
Rajesh
:
[ GNU/Linux One Stanza Tip (LOST) ]###

Sub : Linux Commands (#4)LOST #056

For a newbie introduction to Linux commands and shotcuts visit
URL: http://sunsite.dk/linux-newbie/Linux_commands.htm

<[EMAIL PROTECTED]>##
:

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Re: Parse Error

2003-02-28 Thread Matthew Moldvan
Actually this is incorrect also and will only result in another parse error
... you have (), which is fine, but then {)}, which doesn't make any sense
to the parser.

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
  http://www.trilogyintl.com/ecommerce/
--- 

-Original Message-
From: Alejandro Trujillo J. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 10:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Parse Error


if ($packages == "1")
{
if ($airporttransfer == "car") {$airporttransfer2 = "12.00");}
if ($airporttransfer == "bus") {$airporttransfer2 = "10.00");}
if ($airporttransfer == "none"){$airporttransfer2 = "0.00");}
}

try to learn to use the TABS and the BRACES coz is good for you and for who 
are reading the CODE.

-- 
Alejandro Trujillo J.
Cube Systems LTDA.
web : csltda.com

Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Storing Boolean Values

2003-02-14 Thread Matthew Moldvan
I would say using a 'tinyint' as either a 1 or 0 would be the same ... thats
basically all a boolean TRUE or FALSE is, anyway.

Regards,
    Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
  http://www.trilogyintl.com/ecommerce/
--- 

-Original Message-
From: Micah Stevens [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 14, 2003 3:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Storing Boolean Values


I've been storing checkbox values in MySQL as Enum's for a while, I was
wondering if there's a better way to do things. Is this the most compact
way to store a boolean value? 

-Micah

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] fgets find string help please

2003-02-11 Thread Matthew Moldvan
Correct me if I'm wrong, but something like:

if(($string=fgets($socket,128)) == "hello")
echo 'success!';

should work.  In C or C++ you would use strcmp, but luckily PHP doesn't have
that drawback.

Out of curiosity, what are you working on?

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
  http://www.trilogyintl.com/ecommerce/
--- 

-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 1:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] fgets find string help please


Hi all
 
I would like to find a string say “hello” from the result of my
fsockopen result.
 
I have searched all over for an answer but to no avail so I hand it over
to you clever people here.
 
The kind of result I want is if string excists the $result = 0 else
$result = 1
 
I can carry on from there….
 
while(!feof($socket)) {
   echo fgets($socket,128);
  }
  fclose($socket);
 
$socket is working and echoing a result.
 
Any help is very much appreciated
 
Dave Carrera

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] MySQL Error

2003-01-29 Thread Matthew Moldvan
I would guess something is wrong with the services that are running on your
machine, maybe MySQL isn't on the same machine as your PHP? ... Also, are
you running this on a Windows machine or UNIX?

Matt.

-Original Message-
From: JordanW [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 27, 2003 11:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Error


I'm getting this error message when I try the following code:

$link = mysql_connect("localhost")
or die("Could not connect");
print ("Connected successfully");
mysql_close($link);

The scripts outputs:

Warning: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3

Warning: MySQL Connection Failed: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3
Could not connect

Any ideas?

Thanks



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] simple mail attachment with php?

2003-01-27 Thread Matthew Moldvan
Did you forget to attach the class?

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 Work: (313) 593-7993 x 116
 Cell: (734) 658-0997
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Bruno Pereira [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 27, 2003 6:04 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] simple mail attachment with php?


Try that, is very good, i have the same problem and someone send me that,
try it. I hope is the right one.
Thats just a class, but inside there is the instruction. I put it to work
and is very good.

Cumprimentos

Bruno Pereira
[EMAIL PROTECTED]

-Original Message-
From: cornelia es said [mailto:[EMAIL PROTECTED]]
Sent: sexta-feira, 24 de Janeiro de 2003 18:56
To: [EMAIL PROTECTED]
Subject: [PHP-DB] simple mail attachment with php?


hi you out there...
i hope you're all fine :)

has anybody an idea how to attach a simple text-file to the php
mail()-function???
the scripts i found on the net are quite complicated, featuring different
mime-types, more than one attachment,...

i really would need just the absolute basic functionality to send just ONE
attachment as .txt-file.
(i think this would also be the best way for me to understand the concept ;)

THANKS A LOT in advance
and have a very nice weekend :)
cornelia



cornelia es said

spacedealer  >  agentur für online media GmbH

internet marketing consulting



[Strasse] paul lincke ufer 42_43  [Ort]  Berlin  10999

[Fon] + 49_030 69 53 50 16[Fax] +49_030 69 53 50 77

[www.] spacedealer.de












--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] How to copy databases?

2003-01-10 Thread Matthew Moldvan
Choose the database from the list on the left, then do a dump of the
database by selecting "Structure and Data".  Then, create the new database
and use the INSERT that was generated by your dump.

Regards,
    Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Frank Peavy [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 2:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] How to copy databases?


If I have a database "x" with populated tables and I would like to copy it 
to another empty database for Testing purposes, how is that done through 
phpMyAdmin?


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] QUERY question (group by) - please help

2003-01-10 Thread Matthew Moldvan
Well, I just assumed he was using PHP since this is a PHP list ... :)

Otherwise, he'd have to use SELECT count() FROM ...

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 2:07 PM
To: 'Matthew Moldvan'; 'Damir Dezeljin'; PHP-db list
Subject: RE: [PHP-DB] QUERY question (group by) - please help


Just a side note in case it's important, mysql_num_rows() is a PHP function,
not a native MySQL function. Not being nitpicky, but it might be relevant
if, for some reason, Damir cannot use PHP to obtain the number of rows. From
the tone of the original post, it seems that might be a possibility.

> -----Original Message-
> From: Matthew Moldvan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 1:57 PM
> To: 'Damir Dezeljin'; PHP-db list
> Subject: RE: [PHP-DB] QUERY question (group by) - please help
> 
> 
> Try mysql_num_rows() ...
> http://www.php.net/manual/en/function.mysql-num-rows.php for the
> documentation.
> 
> Regards,
> Matthew Moldvan
> 
> ---
>  System Administrator
>  Trilogy International, Inc
>  http://www.trilogyintl.com/ecommerce/
> ---
> 
> -Original Message-
> From: Damir Dezeljin [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 1:01 PM
> To: PHP-db list
> Subject: [PHP-DB] QUERY question (group by) - please help
> 
> 
> Hi.
> 
> Maybe this isn't the correct list for asking the below question (if
> so sorry ;) ).
> 
> I want to calculate how many rows my MySQL query which uses 'GROUP BY'
> returns.
> 
> The query:
> 
> SELECT 
> FROM test
> WHERE (kid=1) OR (kid=2) OR (kid=4)
> GROUP BY cid,aid;
> 
> 
> Is it posible to get number of rows with such a query from 
> MySQL v3.23.49?
> If it isn't posible ... is it posible in MySQL 4.x?
> 
> I think a lot about this problem and I realize only the following
> solution (to avoid returning a lot of rows in PHP):
> CREATE TEMPORARY TABLE t (i INT);
> INSERT INTO t (i) SELECT aid FROM 
> SELECT COUNT(*) FROM t;
> DROP TABLE t;
> 
> But this isn't so elegant.
> 
> I want to do so on data generated by:
> 
> CREATE TABLE test (
> kid INT,
> aid INT,
> cid INT
> );
> 
> INSERT INTO test
> (kid, aid, cid) VALUES
> (  1,   0,   1),
> (  2,   2,   2),
> (  1,   3,   2),
> (  2,   3,   2),
> (  4,   4,   2),
> (  4,   0,   3),
> (  3,   3,   4),
> (  4,   3,   4);
> 
> 
> Regards,
> Dezo
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] QUERY question (group by) - please help

2003-01-10 Thread Matthew Moldvan
Try mysql_num_rows() ...
http://www.php.net/manual/en/function.mysql-num-rows.php for the
documentation.

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Damir Dezeljin [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 1:01 PM
To: PHP-db list
Subject: [PHP-DB] QUERY question (group by) - please help


Hi.

Maybe this isn't the correct list for asking the below question (if
so sorry ;) ).

I want to calculate how many rows my MySQL query which uses 'GROUP BY'
returns.

The query:

SELECT 
FROM test
WHERE (kid=1) OR (kid=2) OR (kid=4)
GROUP BY cid,aid;


Is it posible to get number of rows with such a query from MySQL v3.23.49?
If it isn't posible ... is it posible in MySQL 4.x?

I think a lot about this problem and I realize only the following
solution (to avoid returning a lot of rows in PHP):
CREATE TEMPORARY TABLE t (i INT);
INSERT INTO t (i) SELECT aid FROM 
SELECT COUNT(*) FROM t;
DROP TABLE t;

But this isn't so elegant.

I want to do so on data generated by:

CREATE TABLE test (
kid INT,
aid INT,
cid INT
);

INSERT INTO test
(kid, aid, cid) VALUES
(  1,   0,   1),
(  2,   2,   2),
(  1,   3,   2),
(  2,   3,   2),
(  4,   4,   2),
(  4,   0,   3),
(  3,   3,   4),
(  4,   3,   4);


Regards,
Dezo



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Examine button

2003-01-10 Thread Matthew Moldvan
Oh I see ... you need to use the http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Sabina Alejandr Schneider [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 11:54 AM
To: Matthew Moldvan
Subject: Re: [PHP-DB] Examine button


Hello!! I will explain myself with an example. I just want 
a button as the button that is in the yahoo site to attach 
a file with the mail. When the user clicks that button it 
appears a window with the directory tree so the user can 
search the file and then press Ok in the window and then 
it appears the file path in a textbox. That's all I want 
to do. After that I can save the file path in the 
database. Is it clearer? Pease if not tell me... thank you 
very much!!!

On Fri, 10 Jan 2003 10:56:20 -0500
  Matthew Moldvan <[EMAIL PROTECTED]> wrote:
>Sounds like maybe he/she wants to print a directory 
>listing and save it in a
>database ... ? As good of a guess as I could figure ... 
>=P
>
>Regards,
> Matthew Moldvan
>
>---
>  System Administrator
>  Trilogy International, Inc
>  http://www.trilogyintl.com/ecommerce/
>---
>
>-Original Message-
>From: John W. Holmes [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 09, 2003 7:25 PM
>To: 'Sabina A. Schneider'; [EMAIL PROTECTED]
>Subject: RE: [PHP-DB] Examine button
>
>
>> Hello everybody!!! I'm writing to you to ask if 
>>somebody knows how
>can
>> I do to emulate the examine button to retrive a file's 
>>path to save
>that
>> string in the database. Specifically, it's a photo, 
>>that've got to
>search
>> in the directory's window. Thanks in advance!
>
>Yeah, you probably got no response the first time you 
>posted this
>because no one knows what you're talking about. Well, at 
>least I don't.
>What does this have to do with PHP?
>
>---John W. Holmes...
>
>PHP Architect - A monthly magazine for PHP Professionals. 
>Get your copy
>today. http://www.phparch.com/
>
>
>
>-- 
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>







_

Tutopia - Acceso a Internet rápido, fácil y a los mejores precios.
http://www.tutopia.com



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Stumped...

2003-01-10 Thread Matthew Moldvan
Out of curiosity, what was the solution? It's always good to learn from
someone else's mistakes ... :)

Regards,
    Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 1:42 PM
To: 'Hutchins, Richard'; '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Stumped...


Nevermind.  I just stumbled across the nature of my problem on
Deja.com.  Thanks anyway and sorry for bugging you guys about what really
was a simple problem.

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 12:36 PM
To: NIPP, SCOTT V (SBCSI); '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Stumped...


Post your SQL statement.

> -Original Message-
> From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 1:37 PM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-DB] Stumped...
> 
> 
>   I am getting an error that is proving very difficult to 
> isolate and
> was hoping for help.  The error is: Column count doesn't 
> match value count
> at row 1.  I would include the code, but it is about 350 
> lines, and I am not
> sure where to narrow it down at.  Any ideas?  Thanks.
> 
> Scott Nipp
> Phone:  (214) 858-1289
> E-mail:  [EMAIL PROTECTED]
> Web:  http:\\ldsa.sbcld.sbc.com
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] which DBMS... MySQL or PostgreSQL

2003-01-10 Thread Matthew Moldvan
Why not direct your energy to an existing project?  No sense in reinventing
the wheel ... http://phprpg.org/.  BTW, they are using MySQL, and it is open
source.

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: dufronte [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 2:48 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] which DBMS... MySQL or PostgreSQL


I want to start my Open-Source Project.. PHP-Based RPG Webgame in the
next 2 months.. Till now, I still confuse in choosing 2 DBMS.
MySQL and PostgreSQL.  In your opinions, which DB should I use in
consider that my Game will content a very big database including Player
data, player Stats, Story and Scenario Database , etc. which one that
easy to access, fast, and could maintain the sql file in small size..
and easy to backup 
 
Thanks for your advise.
 
 
 
 
#Please join Open Community Forum... http://openity.tk  #We're free to
discuss anything, you're free to create your own topic in your own
language. :D
 
 
   ---DuFronte--- 
  http://kapsul.org
  No Fuckin' Shits !!
 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Authenticating through a php script

2003-01-10 Thread Matthew Moldvan
Sorry if this was already answered ...

I think what Dave intends to do is give your students some kind of
authentication (you can use a generic account), then have PHP connect to the
database without the student ever seeing the login information (besides the
script that is doing the basic authentication).

Now, if PHP can connect to the types of databases your system would need to
use is a different story ... you would probably have to ask the vendor about
that.

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Jeremy Peterson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 4:54 PM
To: David Smith
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Authenticating through a php script


Dave,

I am afraid I am not communicating what I am trying to do.

I have multiple databases that my library purchases.  FirstSearch, 
Ebscohost, etc.  These company's have there own authentication systems that 
I have no control over.  A lot of them give user names and passwords that 
can access their secure database; however I will not give out this 
information to students.  I want to design a system that will log the 
students on directly without them ever seeing the log in screen.

A)  Does this make sense in what I am trying to do?
B)  How can I do it?

Jeremy

At 12:38 PM 1/9/2003 -0700, David Smith wrote:
>I haven't looked over all your code in detail, but the problem you
>describe seems to be best solved using PHP Sessions. Sessions store data
>between browser refreshes. You could store whether a user has been
>authenticated via LDAP, and then on a subsequent page, you can reference
>that information to determine how to proceed.
>
>Here's the doc: http://www.php.net/manual/en/ref.session.php
>
>--Dave
>
>On Thu, 2003-01-09 at 11:29, Jeremy Peterson wrote:
> > David,
> >
> > I have ldap working, my problem is the second half of my question.
> >
> > The problem script workflow:
> > 1. Authenticate on LDAP (Resolved)
> > 2. Connect to different authenticated site for the user  (Not sure 
> where to
> > go now.)
> >
> > My guess was to send the post information to where the form action
points
> > to.  Having done this, all I get is a blank page.  I guess if  PHP sends
> > the post information then the client will be out of the authentication
> > loop.  There must be a better way.  But I don't think I have enough
> > information to know how to proceed.
> >
> > Somehow I have to get the browser to send the http post rather than
> > PHP.  Is this possible.
> >
> > Jeremy
> >
> > P.S.
> >
> > The script I am using right now incorporates Chris Alsop's class:
> >
> > 
> >
> >  >## Archive:c_http.class
> >## Description:Basic http class functions (only post right now)
> >## Author: Chris Alsop - [EMAIL PROTECTED] (rumblefiz)
> >## Property Of:Everyone
> >## Date Created:   07/01/2001
> >## Mod History:07/01/2001   Chris Alsop - Initial Coding
> >##
> >
==
> >   class c_http {
> >  ## DECLARE CLASS VARIABLES 
> > var $QUERY_STRING;
> > var $TARGET_DOMAIN;
> > var $TARGET_FILE;
> > var $RESPONSE;
> >  ## END CLASS VARIABLE DECLARATION -
> >
> >  ## FUNCTION: c_http()
> >  ## ARGS: $psQueryString : String
> >  ##   $psTargetDomain : String
> >  ##   $psTargetFile : String
> >  ## ''''''''''''''''''''''''''''''''''''''''
> > function c_http($psQueryString,
> >$psTargetDomain,$psTargetFile) {
> >
> >$this->QUERY_STRING  = $psQueryString;
> >$this->TARGET_DOMAIN = $psTargetDomain;
> >$this->TARGET_FILE   = $psTargetFile;
> > }
> >  ## END FUNCTION: c_http() *
> >
> >  ## FUNCTION: post()
> >  ## ARGS: None
> >  ## RETURNS:  Boolean
> >  ## '''''''''''''''''''''''''''&#

RE: [PHP-DB] Design suggestions - performance improvement

2003-01-10 Thread Matthew Moldvan
What does your SQL look like? I would say make sure you use UNIQUE if that
doesn't mess up your implementation ... also, some code snippets would help
if you need assistance.

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Matthew Nock [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 6:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Design suggestions - performance improvement


Hi all,

I am currently building a site for a cinema to display session times, film
synopsis' etc...

I have built the database as follows:

TABLE:  film_detail
FilmID
FilmName
FilmRunTime
FilmRating
FilmSynopsis
etc...

TABLE  session_data
session_ID
session_filmID
session_StartTime
session_Date


The session_data table might contain a large number of records with the same
film ID, and the same Start Date to cover a large number of sessions that we
would have of the same film on the same day.

I want to know what is the best way to retrieve this joint info from the DB.

currently, I run a single select statement requesting the fields I want from
both tables, where the session_Date equals a given date.  This returns x
number of rows, depending on the number of sessions for all films for that
given day.

However, this means that I am retrieving the Film Synopsis, cast, runtime
etc multiple times...

The data will be returned to the user as below:

FILM TITLE (rating)
session_times<--- will list all sessions - such as 8.45am, 10.15am,
12.00pm, 2.00pm etc etc
FILM RUNTIME
FILM CAST
FILM SYNOPSIS

is this an effective way to return to he data?  or should I be using
individual queries?

Any comments or suggestions would be most appreciated..

Cheers,


M@



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Examine button

2003-01-10 Thread Matthew Moldvan
Sounds like maybe he/she wants to print a directory listing and save it in a
database ... ? As good of a guess as I could figure ... =P

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 7:25 PM
To: 'Sabina A. Schneider'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Examine button


> Hello everybody!!! I'm writing to you to ask if somebody knows how
can
> I do to emulate the examine button to retrive a file's path to save
that
> string in the database. Specifically, it's a photo, that've got to
search
> in the directory's window. Thanks in advance!

Yeah, you probably got no response the first time you posted this
because no one knows what you're talking about. Well, at least I don't.
What does this have to do with PHP?

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Retreive email address from MySQL DB

2003-01-08 Thread Matthew Moldvan
mysql_query returns an array, not simply a string ... my recommendation is
do your error checking near your mysql_query statement (i.e.
if(!mysql_query(whatever) die();) then do an else to loop through the
results.

loop using mysql_fetch_row(RESULT), where result is your "RESOURCE ID",
echoing RESULT[x].

hope this helps.

Matthew Moldvan.
System Administrator,
Trilogy International.

> -Original Message-
> From: Info@Best-IT [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 07, 2003 11:34 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Retreive email address from MySQL DB
> 
> 
> I have a database: web_feedback, and it has 5 columns:
> 
> Firstname varchar(40) not null
> Lastname varchar(40) not null
> Email varchar(40) PRIMARY KEY not null
> ServList varchar(40) not null
> Timestamp not null
> 
> I run a query in a PHP script to retrieve the email address 
> the line of code
> looks like this:
> 
> 
> $query_time = mysql_query("select time from DB where email='$email'");
> 
> 
> This line returns RESOURCE ID #2 in $query_time when I use it 
> to echo it's
> value in an email message:
> 
> 
> $mailcontent = $firstname." ".$lastname." has submitted info 
> as follows:
> \n".
> 
> "First Name: ".$firstname."\n".
> 
> "Last Name: ".$lastname."\n".
> 
> "email: ".$email."\n".
> 
> "Selected Services: ".$servList."\n".
> 
> "Time entered: ".$query_time."\n";
> 
> 
> 
> Anyone able to see off hand if I'm doing anything obviously wrong?
> 
> /T
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Re: Is MySQL available from my host.

2003-01-06 Thread Matthew Moldvan
Robert,

I've only played with the package, and had no trouble installing it on
Windows XP.  I did install it on my C: drive, but I see no reason (unless
there is something I missed in the documentation) why a simple edit of the
configuration files wouldn't change that ...

I would pretty much sum up the rest of the issues with user error.
Installing PHP Triad isn't a big deal, I'm not even sure if it makes any
registry changes ... and because (I'm assuming) you're not using it for a
production environment, it should not pose any kind of threat to your
system.  Basically all it does is start the Apache server and allow it to
interface with MySQL through configured parameters.

Like I said, I haven't played with it too much, because my web host does
support PHP and MySQL, but when I recently had a lapse in internet service,
I tinkered with it a tiny bit.

Regards,
Matthew Moldvan.
   System Administrator
Trilogy International
http://www.trilogyintl.com/ecommerce

-Original Message-
From: Robert Wagner [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 11:22 AM
To: Matthew Moldvan
Subject: Re: [PHP-DB] Re: Is MySQL available from my host.


At www.download.com I located PHP Triad, but I'm a bit nervous, although
the overall ratings for the package are high. Here are my concerns:
  1) Some people couldn't install it all.
  2) Apparently it MUST be installed on drive C. While I have over 500
MB in C:,
   it's merely my boot drive in a multi-boot installation. I
normally boot to my
   WinXP partition. I'd rather install it elsewhere.
  3) I do want to install it under Win XP.
  4) I already have MySQL installed, and I'm guessing that it's a later
version.

Do any of these represent serious barriers to installing PHP Triad?

Thanks to you, Richard and others for past and future help.
Robert
"Matthew Moldvan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]..
.
> Exactly what I was going to say ... go to www.download.com and search
for
> PHP Triad, which is PHP, Apache, and MySQL all in one for Windows, all
FREE.
>
> And yes, some web hosts are too cheap to give database access to their
> clients for their money.  If you want a good host, I can refer you to
one
> for a very reasonable price ...
>
> Regards,
> Matthew Moldvan
>
> ---
>  System Administrator
>  Trilogy International, Inc
>  http://www.trilogyintl.com/ecommerce/
> ---
>
> -Original Message-
> From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 03, 2003 4:50 PM
> To: 'Robert Wagner'; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Re: Is MySQL available from my host.
>
>
> I'm pretty sure it is possible. Unless I'm wrong, PHP, by default, is
> compiled with MySQL support. So, what you're seeing could be a result
of
> that default condition. Just because it's compiled with support for
MySQL,
> doesn't necessarily mean that they will provide the database server.
>
> Please, other list members correct me if I'm wrong.
>
> On the other hand, you don't need a web host to try out dynamic web
pages.
> You can configure Apache, MySQL and PHP on your local machine and do
> everything locally that you would do remotely.
>
> > -Original Message-
> > From: Robert Wagner [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, January 03, 2003 4:48 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-DB] Re: Is MySQL available from my host.
> >
> >
> > Richard:
> > Thanks for your rapid reply. What their tech support is saying is
> > >> Sorry, we do not offer a database server. <<
> > Based on the results of the phpinfo output, is that possible?
> > Thanks again,
> > Robert
> > --
> > "Richard Hutchins" <[EMAIL PROTECTED]> wrote
> > in message
> > 1EA7D3AE70ACD511BE6D006097A78C1E022BFC21@USROCEXC">news:1EA7D3AE70ACD511BE6D006097A78C1E022BFC21@USROCEXC...
> > > I know when I first started working with a host that provided
MySQL
> > support,
> > > there was a very specific path I had to use in the connection
string
> > because
> > > "...the MySQL server is behind a very strict firewall." If I
didn't
> > use the
> > > path exactly as their prototype indicated, I'd get errors like you
> > have
> > > posted.
> > >
> > > I'd suggest you check your host's self-help tech support pages,
drop
> > them an
> > > e-mail or call them.
> > >
> > > > -Original Messa

RE: [PHP-DB] Users on line

2003-01-03 Thread Matthew Moldvan
Don't mean to nitpick, but from what I read onUnload works both when
navigating away and when closing ...

:)

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Peter Lovatt [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 5:10 PM
To: Bernain, Fernando G.; 'Peter Beckman'; Hutchins, Richard
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Users on line


-- snip --

The only exception will be if the user navigates away from the site.
If you need to, you could prevent this by displaying site content in another
popup window with no navbar and no external links.

http is stateless, so you cannot do a true session like Messenger but the
above is reasonably close :)

HTH

Peter

---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Re: Is MySQL available from my host.

2003-01-03 Thread Matthew Moldvan
Exactly what I was going to say ... go to www.download.com and search for
PHP Triad, which is PHP, Apache, and MySQL all in one for Windows, all FREE.

And yes, some web hosts are too cheap to give database access to their
clients for their money.  If you want a good host, I can refer you to one
for a very reasonable price ...

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 4:50 PM
To: 'Robert Wagner'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: Is MySQL available from my host.


I'm pretty sure it is possible. Unless I'm wrong, PHP, by default, is
compiled with MySQL support. So, what you're seeing could be a result of
that default condition. Just because it's compiled with support for MySQL,
doesn't necessarily mean that they will provide the database server.

Please, other list members correct me if I'm wrong.

On the other hand, you don't need a web host to try out dynamic web pages.
You can configure Apache, MySQL and PHP on your local machine and do
everything locally that you would do remotely.

> -Original Message-
> From: Robert Wagner [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 03, 2003 4:48 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Re: Is MySQL available from my host.
> 
> 
> Richard:
> Thanks for your rapid reply. What their tech support is saying is
> >> Sorry, we do not offer a database server. <<
> Based on the results of the phpinfo output, is that possible?
> Thanks again,
> Robert
> --
> "Richard Hutchins" <[EMAIL PROTECTED]> wrote 
> in message
> 1EA7D3AE70ACD511BE6D006097A78C1E022BFC21@USROCEXC">news:1EA7D3AE70ACD511BE6D006097A78C1E022BFC21@USROCEXC...
> > I know when I first started working with a host that provided MySQL
> support,
> > there was a very specific path I had to use in the connection string
> because
> > "...the MySQL server is behind a very strict firewall." If I didn't
> use the
> > path exactly as their prototype indicated, I'd get errors like you
> have
> > posted.
> >
> > I'd suggest you check your host's self-help tech support pages, drop
> them an
> > e-mail or call them.
> >
> > > -Original Message-
> > > From: Robert Wagner [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, January 03, 2003 4:27 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-DB] Re: Is MySQL available from my host.
> > >
> > >
> > > "Robert Wagner" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > I recently signed up with a "low-cost" web server, in order
> > > to do some
> > > > web-page accessed database work. The server has PHP Version
> > > 4.0.6 and
> > > > phpinfo() yields (in part):
> > > >
> > > >   PHP Version 4.0.6
> > > >
> > > >   System SunOS src 5.7 Generic_106541-12 sun4u sparc
> > > > SUNW,UltraSPARC-IIi-cEngine
> > > >   Build Date Feb 28 2002
> > > >   Configure Command  './configure' '--disable-pear'
> > > '--enable-ftp'
> > > > '--with-sybase-ct=/usr/local/freetds' '--enable-trans-sid'
> > > > '--enable-force-cgi-redirect'
> > > >   Server API CGI
> > > >   Virtual Directory Support disabled
> > > >   Configuration File (php.ini) Path
> > > /usr/local/affinity/etc/php.ini
> > > >   ZEND_DEBUG disabled
> > > >   Thread Safety disabled
> > > >
> > > >This program makes use of the Zend scripting language
> engine:
> > > >   Zend Engine v1.0.6, Copyright (c) 1998-2001 Zend
> Technologies
> > > >
> > > >
> > > >
> > > >  |
> > > > (Some output omitted here)
> > > >  |
> > > > mysql
> > > >   MySQL Support enabled
> > > >   Active Persistent Links 0
> > > >   Active Links 0
> > > >   Client API version 3.23.32
> > > >   MYSQL_MODULE_TYPE builtin
> > > >   MYSQL_SOCKET /tmp/mysql.sock
> > > >   MYSQL_INCLUDE
> > > >   MYSQL_LIBS
> > > >
> > &g

RE: [PHP-DB] Re: select date YYYY-MM mysql help

2003-01-03 Thread Matthew Moldvan
I guess for consistencies sake you can use SELECT * FROM table WHERE date
LIKE '2003-01%' also ... just a thought. :-)

Anyway, glad to help out.

Regards,
    Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Max Clark [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:35 PM
To: 'Matthew Moldvan'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: select date -MM mysql help


I ended up using:
SELECT * FROM table WHERE date LIKE '2002-12%';

And:
SELECT * FROM table_name WHERE date BETWEEN '2003-01-01' AND
  '2003-01-31';

Thanks again for the help!
-Max

-Original Message-
From: Matthew Moldvan [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 03, 2003 12:16 PM
To: 'Max Clark'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: select date -MM mysql help


Which solution did you end up using? Just curious, I wasn't sure if mine
was correct ...

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc  http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Max Clark [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: select date -MM mysql help


Thanks everyone for their help!

"Peter Goggin" <[EMAIL PROTECTED]> wrote in message
008f01c2b32a$b50b2500$0301a8c0@petergoggin">news:008f01c2b32a$b50b2500$0301a8c0@petergoggin...
> If mysql has a between function then you could try:
> where date between '2002-12-01'and '2002-12-31'.
> Otherwise try
> where date > '2002-12-01 00:00:00'and date < '2002-12-31 23:59:59' 
> Regards
>
> Peter Goggin
> - Original Message -
> From: "Matthew Moldvan" <[EMAIL PROTECTED]>
> To: "'Max Clark'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, January 03, 2003 9:38 AM
> Subject: RE: [PHP-DB] select date -MM mysql help
>
>
> > Sounds more like an SQL question than PHP, but try the following:
> >
> > SELECT * FROM table WHERE date LIKE '2002-12%';
> >
> > Regards,
> > Matthew Moldvan
> >
> > ---
> >  System Administrator
> >  Trilogy International, Inc  http://www.trilogyintl.com/ecommerce/
> > ---
> >
> > -Original Message-
> > From: Max Clark [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 02, 2003 5:40 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] select date -MM mysql help
> >
> >
> > Hi all,
> >
> > I would like to do a query like this from mysql:
> >
> > select * from table where date = '2002-12';
> >
> > However unless I have the complete date '2002-12-26' the query 
> > doesn't
> work
> > correctly. What else do I need?
> >
> > Thanks in advance,
> > Max
> >
> >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
> --
> 
--
> 
>
>
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Re: select date YYYY-MM mysql help

2003-01-03 Thread Matthew Moldvan
Which solution did you end up using? Just curious, I wasn't sure if mine was
correct ...

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Max Clark [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 3:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: select date -MM mysql help


Thanks everyone for their help!

"Peter Goggin" <[EMAIL PROTECTED]> wrote in message
008f01c2b32a$b50b2500$0301a8c0@petergoggin">news:008f01c2b32a$b50b2500$0301a8c0@petergoggin...
> If mysql has a between function then you could try:
> where date between '2002-12-01'and '2002-12-31'.
> Otherwise try
> where date > '2002-12-01 00:00:00'and date < '2002-12-31 23:59:59'
> Regards
>
> Peter Goggin
> - Original Message -
> From: "Matthew Moldvan" <[EMAIL PROTECTED]>
> To: "'Max Clark'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, January 03, 2003 9:38 AM
> Subject: RE: [PHP-DB] select date -MM mysql help
>
>
> > Sounds more like an SQL question than PHP, but try the following:
> >
> > SELECT * FROM table WHERE date LIKE '2002-12%';
> >
> > Regards,
> > Matthew Moldvan
> >
> > ---
> >  System Administrator
> >  Trilogy International, Inc
> >  http://www.trilogyintl.com/ecommerce/
> > ---
> >
> > -Original Message-
> > From: Max Clark [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 02, 2003 5:40 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] select date -MM mysql help
> >
> >
> > Hi all,
> >
> > I would like to do a query like this from mysql:
> >
> > select * from table where date = '2002-12';
> >
> > However unless I have the complete date '2002-12-26' the query doesn't
> work
> > correctly. What else do I need?
> >
> > Thanks in advance,
> > Max
> >
> >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
> --
--
> 
>
>
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Users on line

2003-01-03 Thread Matthew Moldvan
I think the easiest way to do this would be to use the JavaScript
"onClose();" to load the PHP logout page ... that works whether they simply
leave the page or whether they close the browser also.

Regards,
    Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Peter Beckman [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 2:49 PM
To: Hutchins, Richard
Cc: Bernain, Fernando G.; '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Users on line


I agree; it'd be nice if there was some sort of code that'd be executed
when someone closed their browser.  There is the javascript "on_exit()" or
something where the user, when they leave a domain, is executed.  However,
this only works if they click off the site, not if they close their
browser.  Plus if they go to another site and come back within 5/10/15
minutes, are they still considered "logged in?"

It's fairly impossible to keep track of when users are or are not using the
site that is not really complex.  What if they are reading an article, run
to the restroom, finish reading the article and then click on another page?
I figure they are "idle" after 15 minutes.  If they continue to surf the
site in an hour or two, their session will be updated (if your sessions
last long enough, or if not they'll probably be automatically re-logged in
which case they'd be updated/re-inserted in the online table), and will
once again be counted as a person online.

One example is forcing people to be logged out after 10 minutes of
inactivity.  Bank of America does this, most likely using javascript.
However, if yahoo! did this when I was reading my mail and I stepped away,
I'd be annoyed.  Most sites allow you to be logged in forever ("Remember
me") so forcing people to log out just to be able to count who is online
seems silly.

If you just want to keep track of how many people are logged in, I'd just
say that logged in is defined as having an active logged in session that
was active in the last 5/10/15 minutes.  I'm almost positive that method is
how most web sites determine time online.

Peter

On Fri, 3 Jan 2003, Hutchins, Richard wrote:

> How would the online table be maintained if a user simply closes out the
> browser without actually logging out properly? I'm not at all experienced
> with sessions, but closing the browser should terminate the session,
> correct? Bernain may want to delete from his online table every hour or so
> to catch those people who have not properly logged out (assuming the
"delete
> from online..." query is only fired when they click on a "log out"
button).
>
> I'm not slagging Peter's recommendation. I was thinking this solution
> through as well, but was a bit stuck when it came to users just closing
> their browsers without logging out.
>
> > -Original Message-
> > From: Peter Beckman [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, January 03, 2003 2:32 PM
> > To: Bernain, Fernando G.
> > Cc: '[EMAIL PROTECTED]'
> > Subject: Re: [PHP-DB] Users on line
> >
> >
> > Create a new table named online:
> >
> > id
> > time (int unix timestamp)
> > uid (int probably, user ID of user in question, relating to a
> > user info table?)
> > sessid (char 32 I think)
> >
> > When the user logs in, I assume you set the session.  Insert
> > a row with the
> > current time (unix_timestamp(now()), User ID and the output
> > of session_id()
> > in PHP.  This way you can run a query on that table at any
> > time in one of
> > two ways.
> >
> >  1. select count(id) from online where
> > time>=(unix_timestamp(now())-900)
> >
> > This will give you the number of people who at least
> > logged in in the
> > last 15 minutes.  This isn't very accurate though... so
> >
> >  2. If not already, put sessions in your SQL table.  This way
> > you can run a
> > query like (and John Holmes, please feel free to clean up
> > my joins, i
> > suck at them):
> >
> > select count(*) from online,sessions where
> > online.sessid=sessions.sessid and
> > sessions.date>=(unix_timestamp(now())-900)
> >
> > This will give you the number of users who have done
> > anything on the
> > site in the last 15 minutes.  Change the 900 to 600 or
> > 300 for 10 or 5
> > minutes respectively.
> >
> > Every week or so you'll want to "delete from online where time>=[some
> > number here, unix_timesta

RE: [PHP-DB] select date YYYY-MM mysql help

2003-01-02 Thread Matthew Moldvan
Sounds more like an SQL question than PHP, but try the following:

SELECT * FROM table WHERE date LIKE '2002-12%';

Regards,
    Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Max Clark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 5:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] select date -MM mysql help


Hi all,

I would like to do a query like this from mysql:

select * from table where date = '2002-12';

However unless I have the complete date '2002-12-26' the query doesn't work
correctly. What else do I need?

Thanks in advance,
Max





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] How to Make a Pop Up Window and show there a mysql table for help input data?

2002-12-30 Thread Matthew Moldvan
I would say generate the product id you want to show in your new window,
then for your "?" link, or whatever it may be, include that in the
parameters passed in the URL (aka http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: José Luis [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 11:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] How to Make a Pop Up Window and show there a mysql
table for help input data?


I need know if 's possible show a mysql table like when you are entering
some code product, you press an icon with ? (by example) and there appear
the window showing the table with the code and the description and the you
choose and pick some item from that table and the code pass to the input
field, I saw this on asp but I think there it's possible create some on php
with javascript, I am not sure what is the name of this technic.

Thanks

Regards

JL




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Searching DB and Printing Results

2002-12-30 Thread Matthew Moldvan
Your company does PHP development, and you don't know how? Hmm ... I would
say pick up a PHP book from Half.com or invest in hiring a good Script
Programmer/Database Developer for your project (me, hehe).

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Mike Delorme [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 11:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Searching DB and Printing Results






Hi,

I have a table in DB Music that looks a little mike this:

TABLE NAME
_
 SONG NAMESONG LYRICS
|   | |  |
|   | |  |
|   | |  |
|   | |  |
|   | |  |
|   | |  |
|   | |  |
|   | |  |
|   | |  |
|   | |  |
|___| |__|

In each row of SONG NAME is the name of a song and the corisponding lyrics 
are in the next colum. What I would like to do is set up a search in wich 
the client can enter a sequence of words. The search searches the DB table 
TABLE NAME and looks for the word sequence in the table. The printed results

are the song name and a link to the lyrics. Can this be done? And how can it

be done?

Thanks,
Michael Delorme
www.HybridFusion.com

_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Theory help needed

2002-12-20 Thread Matthew Moldvan
I would recommend phpBB ... very useful and best of all, FREE! :)

http://www.phpBB.com



-Original Message-
From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 12:02 PM
To: Chris Payne; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Theory help needed


why not use one of the existing forum software?

phorum?
FUDForum?


Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Chris Payne [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 20, 2002 6:24 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Theory help needed


Hi there everyone,

I have a messageboard which works, but what I need is some kind of
threading for it.  Right now I have EXTREMELY basic threading, where you
can reply to a message, reply to replies etc . and they'll appear in
the correct part of the messageboard.  What I need though is to be able
to do proper threading, where each reply appears under the original
message and not all over the place, but i'm confused as hell.

Anyway have any experience with this kind of thing and can give me a
push in the right direction?  I know I need to store the original ID,
the forum ID, the message ID of the current message and the ID it
relates to, but it's getting confusing :-)

Thanks.

Chris

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Newbie PHP/MySQL question

2002-12-20 Thread Matthew Moldvan
lol ... sorry but that was just funny

:-D

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 12:24 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Newbie PHP/MySQL question


On Saturday 21 December 2002 01:11, Matt Matijevich wrote:
> I am just getting started with php an mysql.
>
> When I try to insert a record php get stuck in some kind of loop and
> about 25 records are created.  Any help would be greatly appreciated.
>
> Windows 2000 server latest service pack.
> PHP 4.2.3
> MySql 3.23
> IIS 5.0

My mind reading skills aren't very good, but I think there's something wrong

with line 13 of your program.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
The greatest disloyalty one can offer to great pioneers is to refuse to
move an inch from where they stood.
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] random rows...what about tables

2002-12-18 Thread Matthew Moldvan
to get all the table names, then return a random table name, try the
following:



dont forget, when you use a mysql_query(), it returns a result set with more
than one value for each row returned. ie, $array[$i] could be anything from
the table name to its size to its whatever ...

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 9:26 AM
To: 'Bruce Levick'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] random rows...what about tables


I think it's because mysql_list_tables returns a resource identifier
($result). You have to iterate through the resource identifier ($result)
with a while() loop to get the actual table names out. From the PHP.NET
site:



In the example above, I think the output would just be one table name.
However, you're going to have (and want) a list of multiple table names, if
I understand your problem correctly. In which case you'd have to put the
table names in an array called $tablenames so your array_rand($tablenames)
will work.

Haven't tested this out or done this specifically before, so I hope this
helps.
> -Original Message-
> From: Bruce Levick [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 9:19 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] random rows...what about tables
> 
> 
> Sorry,
> Have updated my script with a little help. Upon output i am 
> recieving this.
> 
> Warning: Argument to array_rand() has to be an array in
> C:\WORKING\portfolio\vivamotion\site\php\request.php on line 51
> 
> this is the code below.
> //
> //
> /
> 
>  //listing table in database
> $alltables = mysql_list_tables("portfolio");
> 
> //random array
>  $randomtable = array_rand($alltables);
> 
>  $all = mysql_query("SELECT * FROM Illustrations");
>  $totalRows_Recordset1 = mysql_num_rows($all);
>  $rndm = mysql_query("SELECT * FROM Illustrations ORDER BY 
> RAND() LIMIT
> 4,$totalRows_Recordset1");
>  if (!$rndm) {
>   echo("Error performing query: " .
>mysql_error() . "");
>   exit();
> }
> 
>  $randrow = mysql_fetch_array($rndm);
>  ?>
> 
> //output to browser
>  print "$randomtable\n";
> ?>
> 
> 
> Hope that helps
> 
> 
> 
> 
> - Original Message -
> From: "Jason Wong" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 17, 2002 11:48 PM
> Subject: Re: [PHP-DB] random rows...what about tables
> 
> 
> > On Tuesday 17 December 2002 21:38, Bruce Levick wrote:
> > > Bruce Levick - Vivamotion
> > > Been searching for an answer to selecting a random table 
> and then a
> random
> > > row within the selected table.
> > >
> > > I have this code which successfully selects a random row 
> within a hard
> > > coded table. But just can't get the random table working.
> >
> > [snip]
> >
> > > Anybody see the solution??
> >
> > First we need to know _what_ the problem is. I think we can 
> assume your
> code
> > doesn't work the way you expected. Can you tell us _how_ it 
> doesn't work?
> > Error messages?
> >
> > --
> > Jason Wong -> Gremlins Associates -> www.gremlins.biz
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet Applications 
> Development *
> >
> >
> > /*
> > We place two copies of PEOPLE magazine in a DARK, HUMID mobile home.
> > 45 minutes later CYNDI LAUPER emerges wearing a BIRD CAGE 
> on her head!
> > */
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] pictures into MySQL

2002-12-18 Thread Matthew Moldvan
I'm not completely sure of the implementation details, but look into the
BLOB data type.  

http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#BLO
B

 Regards,
 Matthew Moldvan

---

 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/

---

-Original Message-
From: Seabird [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 3:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] pictures into MySQL


Hi everyone,

I know that inserting actual pictures into a MySQL DB is not the best
solution, but since I know the size is going to be limited I want to do it
anyways. How do I upload a picture into a DB? (what type of table etc.).

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php