frozenpeas
Technical User
Hello,
For the life of me, I cannot get this to work. Can anyone see what is wrong?
or
Both of these result in:
Could not query database. No Database Selected. (1046)
Variable values are good, paths are good, database and table are there and contain data.
Any ideas? Thanks.
frozenpeas
--
Micfo.com Affiliate Program
For the life of me, I cannot get this to work. Can anyone see what is wrong?
Code:
<?php
require_once('connections/connect.php');
mysql_select_db($database_connect,$connect);
$query = "SELECT * FROM hectik ORDER BY date DESC,id";
$myQuery = mysql_query($query) or die("Could not query database. ".mysql_error().'. ('.mysql_errno().')');
while($row = mysql_fetch_assoc($myQuery)){
echo "test";
}
?>
or
Code:
<?php
require_once('connections/connect.php');
mysql_select_db($database_connect, $connect);
$query = "SELECT * FROM hectik ORDER BY date DESC,id";
$myQuery = mysql_query($query) or die("Could not query database. ".mysql_error().'. ('.mysql_errno().')');
while($row = mysql_fetch_array($myQuery)){
echo "test";
}
?>
Both of these result in:
Could not query database. No Database Selected. (1046)
Variable values are good, paths are good, database and table are there and contain data.
Any ideas? Thanks.
frozenpeas
--
Micfo.com Affiliate Program