PHP code for database connection and querry:
$link = mysql_connect("localhost", "root", "pass") or die("connection error");
mysql_select_db("database",$link);
Querry code:
$vec=mysql_query("SELECT * FROM PHOTOS");
for($i=0;$i"<"mysql_num_rows($vec);$i++)
(Take the "" out)
{
mysql_data_seek($vec,$i);
$a=mysql_fetch_row($vec);
echo"$a[0] $a[1] $a[2]";
}
Where $a[0] it's the first field in the querry result.
Blogger templates
Blogger news
Blogroll
Archives
-
▼
2012
(231)
-
▼
July
(18)
- How to use Gmail to send email in Opencart
- Domain Model Validation
- What is CakePHP? Why Use it?
- PHP assignment operators
- PHP code for database connection and querry
- How to hack facebook accounts
- PHP Switch Statement
- DateFormat
- No title
- Real Estate Script, Real Estate Software, PHP Scri...
- Assignment#2
- Outsourcing PHP Projects
- PHP if statement
- Url Encode and Url Decode
- HTTP Headers
- Date() Functions
- Ways To Earn With AIM Global
- foreach() in php
-
▼
July
(18)