Unstoppable Domains

SQL again.

Spaceship Spaceship
Watch

Coolprogram

Established Member
Impact
7
How do you work a SQL code, I would like to know.
What i mean by this is like with a search engine, they use the SQL that just opens everything in thier database. How would i do it, 'cause I am going to eventually make a forum, I hope.
-CP
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
There's a lot that you need to know when talking about SQL; In my opinion, my importantly security.

Depending on what SQL database you want to use (I assume for mainstream web projects - MySQL) and what programming language you prefer (for me, it's PHP), you can find a variety of resources on development sites. If you're not interested in those that I listed above, you can search "[language] [database] resources". If you're interested in the conbination that I listed above, look below.

http://www.php-mysql-tutorial.com/
http://www.php.net/mysql

-Steve
 
0
•••
Cool:

Basically, you issue, then you get the results to maniuplate.

something like this:

PHP:
$sql = "select * from table where lastName='lastname'";
$result = mysql_query($sql);

Queries can returm multiple rows. You can then loop through them like this:

PHP:
while($row=mysql_fetch_array($result)) {
   # $rowis an array with the field names as the array indices.
   echo "Last Name: $row[lastName]<br>";
   echo "First Name: $row[firstName]<br>";
}

THis example is over simplified. As STSCAC suggests, you will need to doa bucnh of reading up on this subject.

-Bob

[/php
 
0
•••
Thanks, u guys.
-CP
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back