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
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,
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 ;
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
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:
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
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:
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]
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
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
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
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,
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]
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
14 matches
Mail list logo