SQL again.

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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
Close
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
Close
Thanks, u guys.
-CP
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back