Reading

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
Straterra
Forum Regular
Posts: 527
Joined: Mon Nov 24, 2003 8:46 am
Location: Indianapolis, Indiana
Contact:

Reading

Post by Straterra »

I have a table with multiple rows..I would like to read stuff from just 1 row..The code I have is ...

Code: Select all

<?php
$getinfo = sqlite_query($db, "select * from logintable");
$array = sqlite_fetch_array($getinfo);
echo $array['username'];
echo $array['password'];
?>
But this will only read from the ONLY row..right? So..how would I only read from the row that say.. socomname = 'straterra' ?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Code: Select all

select * from logintable where socomname='straterra'
Post Reply