Search trou a database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
izlik
Forum Newbie
Posts: 3
Joined: Sun Apr 01, 2007 10:20 am

Search trou a database

Post by izlik »

Hey there

If some person could help me with this i would be eternely thankfull.

let's say i have this form that's shown bellow,
and i when a user inserts their cell number in the field and presses the button,
i want it to search trou the database named "mms" and the table "numbers" and search
for their number on the row ['sender'] for the number enterd, then if a number is found
search the row ['id'] use that it and check if a .jph file in /data/ folder has the same name as that id, and if it exist, display the picture or pictures on the page (if they sent in several) from that number with a link to each picture

Edit:

Basiclly, i have a page where where i send in my MMS message from my cellphone, when intercepted by my script it's enterd into the database in the table "MMS" on the Row "ID" and given and uniqe Id number, then the picture is save with that ID name into the folder /data/ and my cellnumber is enterd on the row "sender" in the same database.

now what i want is a script form that i cant enter my cellnumber into, press "search" and it searcher the database for "my number" or number (if i sent in more then 1 times" and displays all the images that i have send in with link's to then

example
[Picture shown here]
[Link to the picture shown under it]

i hope this made more sense



Code: Select all

<form name="input" action="html_form_action.php"
method="get">
Cell numbet: 
<input type="text" name="user">
<input type="submit" value="Search">
</form>
I know how to make the PHP script get the cell number, but i have no idea at all how to make it search for the rest i wanted it to do :(
Last edited by izlik on Sun Apr 01, 2007 1:48 pm, edited 3 times in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You're probably looking for JOIN syntax information.
izlik
Forum Newbie
Posts: 3
Joined: Sun Apr 01, 2007 10:20 am

Post by izlik »

i have no clue, i got to the point where the php code search the database for the numbers, after that i had no clue about that rest and hoped someone could help me :(
Post Reply