[PHP-DB] delete statement question

2002-03-25 Thread Andrés Felipe Hernández
Hi, I hope you can help me with this: I have these 3 tables. exam ( exam_id ) questions ( question_id exam_id ) answers ( answer_id question_id ) I am wondering if i can delete all the rows for answers linked to a given exam using only one delete

Re: [PHP-DB] delete statement question

2002-03-25 Thread Andrés Felipe Hernández
Rick, thanks for the idea but actually it wouldnt work :( take a look: mysql delete answers - from exam e, questions q, answers a - where a.question_id=q.question_id and q.exam_id=e.exam_id; ERROR 1064: You have an error in your SQL syntax near 'answers from exam e, questions q,

Re: [PHP-DB] Re: multiple select statements

2002-03-05 Thread Andrés Felipe Hernández
check out this code: * function build_statement ( $col, $needle ) { $sWhere = ; if ( $needle!= ) { $array = explode ( , $needle ); $sWhere = ( ; $firsttime= True; foreach ( $array as $str ) { if ( !$firsttime) $sWhere.= or ;

Re: [PHP-DB] Re: forced page links...

2002-02-27 Thread Andrés Felipe Hernández
hi jas, am sure you asked this before and i already replied. Anyway miles posted this which is more elaborated than the one i proposed: *** This is at the top of every file requiring an authenticated user on one of our sites: ? include(secure.php)? and secure.php consists of this, all on one

Re: [PHP-DB] formating problem

2002-02-21 Thread Andrés Felipe Hernández
jas, Replace echo input type=\submit\ name=\delete\ value=\delete\/form/table; With: echo trtdinput type=\submit\ name=\delete\ value=\delete\/td/tr/form/table; - Original Message - From: jas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 3:12 AM Subject:

Re: [PHP-DB] Semi-newbie - postgres polygon/points and PHP?

2002-02-18 Thread Andrés Felipe Hernández
sorry the late reply, could you consider having each set of coordinates in 2 different fields? select r.x, r.y from room r andrés - Original Message - From: Roger Southwick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 16, 2002 12:18 AM Subject: [PHP-DB] Semi-newbie

Re: [PHP-DB] Required pages...

2002-02-13 Thread Andrés Felipe Hernández
I include this file on the top of all my scripts: ?php session_start(); if ( !session_is_registered ( admin_id ) ) { Header ( Location: /admin/index.php ); die ( no active session.) ; } ? /admin/index.php is the script where i do the login andrés - Original Message - From:

Re: [PHP-DB] Inserting NULL values does not work

2002-02-02 Thread Andrés Felipe Hernández
actually, try using $park = NULL instead go $park = NULL; in php NULL is the same that which is the same that 0 - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'Andy' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, February 01, 2002 7:51 AM Subject: RE: [PHP-DB]

Re: [PHP-DB] how to reverse a hudge multidimensional array?

2002-01-31 Thread Andrés Felipe Hernández
This seems quite familiar for me. Does this has to do whit chaos? Anyway, i think i'm getting the idea, but it would be a better to see the whole code. (at least for me) good luck, andrés thx again for helping me In fact i think the solution you gave me isn t not much faster as the while

Re: [PHP-DB] Re: Session across Multiple Hosts

2002-01-29 Thread Andrés Felipe Hernández
i did something like that once. I passed the session variables using an encrypted query string ( could be using a hidden input, anyway i think it is a good idea to encrypt the value). I didnt like it because of the unnecesary use of a second server, but i'm sure sometimes you just have to go

[PHP-DB] similar_text

2002-01-23 Thread Andrés Felipe Hernández
From the php manual: int similar_text (string first, string second [, double percent]) This calculates the similarity between two strings as described in Oliver [1993]. Note that this implementation does not use a stack as in Oliver's pseudo code... where can i find the algorithm or pseudo

Fw: [PHP-DB] tracking users...

2002-01-21 Thread Andrés Felipe Hernández
jas: - Original Message - From: jas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 21, 2002 10:50 PM Subject: [PHP-DB] tracking users... I am fairly new to PHP and have setup a site that connects to a MySQL db to store different information from our users,

Re: [PHP-DB] Tricky Quiestion!!!

2002-01-15 Thread Andrés Felipe Hernández
it seems to me that the problem with your encryp' function has to do with your 'separators'. Try replacing every ocurrence of your especial chars ( in this case the values $sep could get ) before using your encrypting function. hope i got it right, andy Thomas omega Henning [EMAIL PROTECTED]

Re: [PHP-DB] index page

2002-01-15 Thread Andrés Felipe Hernández
so what's the problem? : ) you should have a link like this: a href=results.php?criteria=?php echo $critera ?max_results=?php echo $max_results ? the link /a now you'll be able to do your query at the results.php script using those variables. andy - Original Message - From: Barry