GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 22-Jul-2004, 03:50
jlee jlee is offline
New Member
 
Join Date: Jul 2004
Posts: 9
jlee is on a distinguished road

Easy SQL query


Hi - hopefully this is an easy query for any experts out there!

I have a text entry on a form where someone enters a surname they want to search for and when they press the submit button the page should display the results. The page is linked to a table in a phpmyadmin database with following headings - MemberID, Title, FName, LName. The action element of the form is to go to a php page with the following code:
PHP Code:

<?php
    include "sqlsearchmem.inc";
    echo "<table border=1>";
        for($i=0;$i<1;$i++){
            echo "<tr>";
            $row=mysql_fetch_row($result);
            for($j=0;$j<1;$j++){
                echo"<td>";
                echo"$row[$j]";
                echo"</td>";
                }
                echo"</tr>";
            }
            echo"</table>";
            ?>


The include file has the SQL which I am struggling with. I have played around with a few variations - do I need to use $_POST somewhere? I need it to search the database for whatever surname is entered in the form and then return the results - can anyone help? Thanks
Last edited by JdS : 22-Jul-2004 at 07:13. Reason: Please insert [php] & [/php] tags between your example PHP codes
  #2  
Old 22-Jul-2004, 07:15
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
I am afraid I can't help you without looking at the code inside the include file...
 
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL multiple languages query samtediou MySQL / PHP Forum 6 23-Jul-2003 13:09
Thanx for the sql query, but there must be a little mistake norok MySQL / PHP Forum 13 30-Jun-2003 06:30
mysql vs sql - what is the difference zabell MySQL / PHP Forum 2 14-Jun-2003 16:32
Search Engine Positioning 101 and 201 "How To" Tips... 000 Search Engine Optimization Forum 0 29-May-2003 10:34

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 06:32.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.