php and mysql errors?

  • Thread starter Thread starter nerd
  • Start date Start date
N

nerd

Guest
everytime I upload something I get this message:


Unknown column 'keyword4' in 'field list'

The thing is, everything else works. When I upload in phpmyadmin, everything shows up.

the error shows only when I go thro user login to upload stuff.

What could be problem? :/
this is the
this is what the line that contains the error:

while($row = mysql_fetch_array($result))
this is a sample of the code


$result = mysql_query("select * from publications where keyword4 like \"%$trimmed%\" order by keyword4");
#
while($row = mysql_fetch_array($result))
#
{
#
echo "<tr>";
#
if($userCheck == "admin"){
#
echo "<td id=\"noLinkTd\"><a href=\"?page=edit&cID=".$row[0]."\">[Edit] ".$z."</a><br />";
#
echo " <a href=\"javascript://\" onClick=\"deleteRo(".$row[0].",".$z.")\">[Remove]</a>";
#
echo "</td>\n";
#
}
#
else
#
echo "<td>".$z."</a></td>\n";
#
echo "<td>".$row[1]."</td>";
#
echo "<td>".$row[2]."</td>";
#
echo "<td sorttable_customkey=\"2008".$row[14]."01120100\">".$row[3]."</td>";
#
if($row[4] != null){
#
$day = (int)$row[4];
#
echo "<td>".date("d",mktime(0,0,0,0,$day))."</td>\n";
#
}
#
else
I am working with php 5 btw and MySQL Version 4.1 or 5.0 (depends of server)
I also get error:

PHP Error Message

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a2288820/public_html/functions.php on line 741

when I try to search. I can search by keyword and author, but not by type of document. (which is when that problem pops up)
how can I fix this? T_T
 
Back
Top