Jump to content

[SOLVED] MYSQL help


dity

Recommended Posts

$tuonline=mysql_query("SELECT *,DATE_FORMAT(date,'%M %d at %l:%i %p')as 'lastonline' FROM mostonline");
$tuonline=mysql_fetch_array($tuonline);

 

If that is my code and im getting a

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ...

 

Am I missing a table?

 

Thanks,

Link to comment
https://forums.phpfreaks.com/topic/117595-solved-mysql-help/
Share on other sites

I know how to create tables that have been predefined, for example

 

CREATE TABLE `ticketcontent` (
  `id` int(25) NOT NULL auto_increment,
  `ticketid` varchar(25) NOT NULL default '',
  `poster` varchar(25) NOT NULL default '',
  `postertype` char(1) NOT NULL default '',
  `content` text NOT NULL,
  `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`)
)

 

But I am not experienced enough to understand what you mean by look at the table definition.

 

If you mean that it says Unknown column 'date' in 'field list'

 

are you saying that date should go in a column field list?

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/117595-solved-mysql-help/#findComment-605598
Share on other sites

I'm installing this script and it appears they or I missed something...

 

Ignoring the fact that the script was written without any error checking, error reporting, or error recovery logic (which would earn it a C- in a programming class), you should not be having these type of problems or need to be modifying the tables if the tables have already been created.

 

Could you provide a link to the script's site so that someone can see what should be going on.

Link to comment
https://forums.phpfreaks.com/topic/117595-solved-mysql-help/#findComment-606032
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.