PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
rfigley
Forum Commoner
Posts: 70 Joined: Sun Apr 21, 2002 7:10 pm
Post
by rfigley » Fri Sep 13, 2002 4:00 pm
I'm currently using this query to retrieve a record to be deleted:
Code: Select all
<?php
$query = ("select * from tbl_members where phone = '$phone'");
?>
However I need to query for an additional field "chapter" to prevent multiple record retrieval. What is the correct syntax for this?
Takuma
Forum Regular
Posts: 931 Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:
Post
by Takuma » Fri Sep 13, 2002 4:04 pm
Do you mena like this?
Code: Select all
<?php
$query = ("select * from tbl_members where phone = '$phone' AND chapter = '$whatever'");
?>
rfigley
Forum Commoner
Posts: 70 Joined: Sun Apr 21, 2002 7:10 pm
Post
by rfigley » Fri Sep 13, 2002 4:42 pm
Sorry, no I need a record that queries tbl_members where phone = number and tbl_chapter where chapter_name = chapter
Takuma
Forum Regular
Posts: 931 Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:
Post
by Takuma » Fri Sep 13, 2002 4:50 pm
Code: Select all
SELECT * FROM tbl_members WHERE tbl_members.phone = $number AND tbl_chapter.chapter_name = $chapter