Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Print Help me please

Author  Topic 

SqlNewbie123
Starting Member

3 Posts

Posted - 2011-01-24 : 11:17:39
I need to print the results of my sql query to a html/php page

Select * FROM Orders WHERE Warehouseid='c'

i need it to print the results please help..

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-01-24 : 11:22:35
you need to call this query from php see

http://www.comptechdoc.org/independent/web/php/intro/phpmsquery.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

SqlNewbie123
Starting Member

3 Posts

Posted - 2011-01-24 : 11:38:29
Im new to this so your saying




$mainsection="links"; //The name of the table where web links are stored

$query1='SELECT * FROM `Orders` WHERE warehouselocation=\'c\'';

order by OrderDate DESC

$result = mysql_db_query($dbname, $query1) or die("Failed Query of " . $query1); //do the query
while($thisrow=mysql_fetch_row($result))
{
$i=0;
while ($i < mysql_num_fields($result))
{
$field_name=mysql_fetch_field($result, $i);
echo $thisrow[$i] . " "; //Display all the fields on one line
$i++;
}
echo <br>"; //put a break after each database entry
}


I have nothing named links or n e thing like that so what do you think?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-01-25 : 03:22:12
You need to post this question at php forum

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -