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
 Posted Script Bad/HELP PLEASE

Author  Topic 

SqlNewbie123
Starting Member

3 Posts

Posted - 2011-01-24 : 12:12:16

echo <br>"; //put a break after each database entry
}

From link

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

error

Parse error: syntax error, unexpected '<', expecting ',' or ';' in /home/content/87/7333587/html/DepartmentC.php on line 24


how do i make this work and print?

Full Code

mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found. " . $dbuser);

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

$query1='SELECT * FROM `Orders` WHERE `warehouselocation`Like \'%j%\''
. ' ORDER BY `Orderdate`';
$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
}

Yes i kno connection details are missing but they work lol

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-01-24 : 12:20:48
Try a mysql or php forum?


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -