Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Error:invalid Use Of Group Function


version:mysql 4.0.18 for win

hi,all dear:)

when execute sql-statement,
error raise:

update customer,cu_order set customer_point=0
where customer_keyid=order_customerid and
DATE_SUB(now(),INTERVAL 1 YEAR)=DATE_FORMAT(max(order_time),"%Y-%m-%d 23:59:59")

error:invalid use of group function

i beg someone tells me why?how resolve?

thx




View Complete Forum Thread with Replies

Related Forum Messages:
Invalid Use Of Group Function (was "Baffled By Query Error")
trying to figure out why I keep getting this error with the following query:

SELECT c.account_id,a.name,a.company,SUM(c.agent_product_time) AS mins
FROM account a LEFT JOIN calls c ON c.account_id = a.id
WHERE c.calldate >= DATE_SUB(NOW(),INTERVAL 14 DAY) AND c.agent_id = 2
AND SUM(c.agent_product_time) >= '500' GROUP BY c.account_id ORDER BY mins

ERROR: #1111 - Invalid use of group function

View Replies !
Invalid Use Of Group Function & SUM() And MAX()
I have the following Sql Statement... I'd like to find the sum of hrs worked by an employee in the month, the required number of hrs, and the sum of the difference between the two, the worked hrs are calculated by subtracting the max vtranstime - min vtranstime and the required hrs are calculated by subtracting max to1 - max from1....

View Replies !
Invalid Use Of Group Function - Max(`mainid`)+1
I am trying to insert a incremented number into the menu table. I will have an autoincremented number as well as the mainid number. When I tested the code that is below, the above error happened. Can someone please tell me the correct way of doing this? I am getting really frustrated with this. Nothing wants to work for me.

require "config.php";
$insert06 = "INSERT INTO `menu` (`mainid`)
                VALUES (max(`mainid`)+1)"; // error line
if (mysql_query ($insert06)) {
    print "Mainid added.";
    $query2 = mysql_query("SELECT mainid FROM menu") or die ("Could not query because: ".mysql_error());
    while($row2 = mysql_fetch_array($query2)) {
        echo $row2['mainid']." = Mainid";
    }
} else {
    print "<p>Could not add the entry because: <b>" . mysql_error() . "</b>. The query was $insert06.</p>";
}
mysql_close();

View Replies !
Invalid Use Of Group By
I have the following query:

SELECT CLAIMPOLICYNUMBER AS Plan, PROVIDERSPECIALTY AS Specialty, TINNUM AS Tin, SUBTINSEQNUM AS SibTin, CHARGETYPECATEGORY AS ChargeCategory, SUM(BILLEDCHARGE) AS Billed, SUM(PAID) AS Paid, " + _
COUNT(DOCUMENTNUM) AS ChgCount
FROM BAT
WHERE CASENUM='0000911'
AND CHARGETYPE <> 'DENTAL' AND CHARGETYPE <> 'VISION' AND CHARGETYPE <> 'ADMIN'
AND PMTDATE >= '2005-06-01' AND PMTDATE <= '2005-06-30'
GROUP BY CLAIMPOLICYNUMBER, PROVIDERSPECIALTY, TINNUM, SUBTINSEQNUM, CHARGETYPECATEGORY
ORDER BY SUM(BILLEDCHARGE)

It works great without the ORDER BY clause, but with it, I get the aforementioned error.

View Replies !
Group By Returns Invalid Dates
Hi i have one table:

ID, User, Score, Date
1, mac, 1234, 2007-12-09 09:01:07
2,kurca, 3232, 2007-12-05 09:43:57
3, mac, 999999, 2007-11-07 09:44:14

I wan to create a high score list which will represent the best scores but not repeating anyone for example:
1, mac, 999999, 2007-11-07 09:44:14
2,kurca, 3232, 2007-12-05 09:43:57


Now i use:
SELECT ID, User,MAX(Score) as maxScore,Date
FROM `table`
GROUP BY User
ORDER BY maxScore DESC

with this query the score is right but the date is invalid example:
1, mac, 999999,2007-12-09 09:01:07
2,kurca, 3232, 2007-12-05 09:43:57

View Replies !
IF Function,GROUP BY,aggregate Function Problems
Yep, I have all those problems in the title. So I'll explain each one at a time - I did have another thread relating to this very same query but I thought it was time to update where I am with the query because at the moment I feel like I am getting nowhere!

The query I have basically searches through an items_ordered table through each product and checks to see whether the item is VATable or not. This is not where I have the problem though. Where I am really having the first problem is when I am trying to use the IF function to check if the TOTAL of an order is over £300. IF it is then I multiply it my 0.95 (i.e. 5% off). With the query below I get no errors but neither do I get the desired result. It's as though it couldn't even see it. =....

View Replies !
Mysqlhotcopy Error :: Invalid Db.table Name
I have a large database that I'm unable to backup with mysqldump.

So I tried mysqlhotcopy , testing it on a smaller wordpress installation as:

mysqlhotcopy bestfood_word /path/to/new_directory

But it gave me this error:

Invalid db.table name 'bestfood_word.bestfood_word`.`wp_categories' at /usr/bin/mysqlhotcopy line 854.

Could anyone tell me what would cause this and if I should use a different command?

View Replies !
Group Function
I have a table salary, and when I select it, it looks like this ....

View Replies !
Count Function & Group By
Getting an error saying I cannot Group on JState2

Is this a version issue? What is an alternate?
(want to show only results having greater than 2 of the same JState 's)

SELECT COUNT(JState) as JState2, JID, StateTerm
FROM JPosts2, State
WHERE State.StateAbbr=JPosts2.JState AND (`JClass` = 'Mechanics')
GROUP BY JState2 HAVING JState2 >4
ORDER BY JState

View Replies !
GROUP BY Function And Getting Rid Of NULL Results
Ok, here is a query I'm doing:

SELECT site , sum(uniques ), sum(trials +full_price ), round(sum(uniques)/sum(trials +full_price )) as ratio FROM mpa3_all_stats WHERE date BETWEEN '2005-12-01' AND '2005-12-15' GROUP BY site

What I want to do is get rid of the null results that I'm getting from this return. As if I order by the last field, the nulls will go to the top if it's ASC. Which I need to do a ASC order on the last column. But I can't figure out a while to get rid of the null results. I've searched everything I could think it would be under.

Here is partial data I'm getting:

Code:


+------+----------------+----------------------------+------------------------------------------------------+
| site | sum( uniques ) | sum( trials + full_price ) | round( sum( uniques ) / sum( trials + full_price ) ) |
+------+----------------+----------------------------+------------------------------------------------------+
| 18 | 99865 | 119 | 839 |
| 19 | 121386 | 188 | 646 |
| 20 | 479 | 0 | NULL |
| 21 | 1314 | 0 | NULL |
| 22 | 100541 | 226 | 445 |
| 33 | 21457 | 169 | 127 |
+------+----------------+----------------------------+------------------------------------------------------+

View Replies !
Function Error
I´m trying to create a function using SQL language however even the command below that I found in the MySql docs is not working, I always get the same error whe I try to create a function
Any suggestions ????


CREATE FUNCTION hello (s CHAR(20)) RETURNS CHAR(50)
RETURN CONCAT('Hello, ',s,'!');


Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(s Char(20)) Returns Char(50) RETURN CONCAT('HEllo,',s,'!')' at line 1 (State:37000, Native Code: 428)

View Replies !
Error Messages In Function
First, I cannot use PHP or C. My requirements are for a pure MySQL interface.
I am using MySQL v5.0.Is there any way to output a message to the console from a FUNCTION?This is needed mostly for error handling, but all error handling functionality
seems to only point to PHP or C, which I cannot use.

In postgresql this is easily done with RAISE NOTICE 'msg';
Like in Ingres it can be done with WRITE 'msg';

But I am baffled that MySQL does not have any equivalent functionality.

View Replies !
Function For ERROR And/or ERRORNO?
This may seem like a silly question, but MySQL has the mysql_error & mysql_errno API functions. So why is there no similar ERROR & ERRNO that can be called from the command line?

Similarly, MS SQL Server, PostgreSQL, INGRES, etc. all have a
RAISE ERROR and/or RAISE NOTICE function to output messages to the user.
Why is there no similar functionality in MySQL?

The above seems like pretty basic functionality that was overlooked.

Finally, I searched throughout the MySQL site, mailing lists and forums, but I can find no way to formally request these enhancements. Does anyone know of how that is accomplished?

View Replies !
The Function 'IN' Causes Error In MySQL 4.1.9
I am currently using MySQL 4.1.9 and I'm planning to upgrade to MySQL 5.0 soon. But for the mean time, I am experiencing problems with the function 'IN'. Here's the error message I received..

#1270 - Illegal mix of collations (latin1_swedish_ci,IMPLICIT), (utf8_general_ci,COERCIBLE), (utf8_general_ci,COERCIBLE) for operation ' IN '

View Replies !
SQL Error - GROUP BY
I'm using the following to retrieve data:

Code:

select * from items where ItemCategory = $CategoryID GROUP BY country



when i call the page using the following format:

http://www.mysite.com/index.php?CategoryID=45

everything works fine as i intend it to. However, if i call the page leaving out the 'CategoryID=45', ie http://www.mysite.com/index.php it brings up the following error:

Quote: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY country' at line 1.

View Replies !
Error While Using MAX Function In Update Clause
i want to update the recorde like this
Expand|Select|Wrap|Line Numbers

View Replies !
Replace Function :: Error 1064
I am trying to do an update/replace function in MySQL but I am getting MySQL error #1064. Basically the query is just trying to update a field called Description in a table called Widgets by changing some values to a new value. So, for example, I want to change the field 'oldvalue123' to 'newvalue123'

The query works well in MS SQL 2000 but not in MySQL- Here is the query

Update Widgets
Set Description = (Select Replace(Description,'oldvalue','newvalue'))
From Widgets

View Replies !
An Equivalent For @@ERROR Function In MSSQL
Has MySql someting like @@error in MSSQL? if no, how i can find dynamically that error occured and it's number?

View Replies !
Error: Call To Undefined Function Mysql_connect() .....
I'm running MySQL 4.1 with PHP 5.0.2 on Windows 2000. However I cannot
connect to the database. I receive the folowing error:

Fatal error: Call to undefined function mysql_connect() in C:Program FilesApache GroupApache2htdocsfilea.php on line 8

My system's particulars are:

1.
The system path on my system is set as follows:
C:WINNTsystem32;C:WINNT;C:WINNTSystem32Wbem;C:
Program FilesMySQLMySQL Server 4.1in;C:PHP5;C:PHP5ext;

2.
The php.ini file is set to the full path of the 'ext' directory in
my PHP installation, i.e.
extension_dir = "C:PHP5ext"
The "extension=php_mysql.dll" line is not commented in my php.ini file.

3.
The information page from phpinfo() does not include a
separate section called “mysql†as I believe it should.
The extension_dir in phpinfo() is set to C:php5

Can anyone tell me what I am doing wrong?

View Replies !
Help, (Select...Group By..) Result Error
I have data like this :
ord_empno | ord_date | ord_code
00136 | 1996-07-08 | 00010
00136 | 2003-12-31 | 00020
00136 | 2004-01-01 | 00070

I'd like to select data with the latest date (row 3).

sql : SELECT ORD_EMPNO, MAX(ORD_DATE) ORD_DATE, ORD_CODE
FROM TB_PSN_ORDER
WHERE ORD_EMPNO = ?' GROUP BY ORD_EMPNO

but the result
00136 | 2004-01-01 | 00010

What's wrong with that ? It seem it takes only the first ord_code.

View Replies !
Error 1305 - Trying To Execute User Defined Function
In my investigation, I attempted to execute the function (named 'esp')
and I started getting the error message: (from database named XQ)

SELECT esp(0);
Error 1305 (42000): FUNCTION XQ.esp does not exist

So from there, I attempted to re-install it:

CREATE FUNCTION esp RETURNS INTEGER SONAME 'mysqlExtension.so';

I then get this back from mysql:

FUNCTION 'esp' already exists.

I also tried in vain:

DROP FUNCTION esp;

same message comes back:

Error 1305 (42000): FUNCTION XQ.esp does not exist

Not sure where this went wrong. It was working fine then something made

it go amok. In one case it says it exists, the other it does not.

View Replies !
Fatal Error: Call To A Member Function On A Non-object
I am wondering why I am getting the following error:
Fatal error: Call to a member function on a non-object in /home/blu6592/public_html/new/register2.php on line 46.
Here is the code that is on line 46:

PHP Code:

 $name_check = $db_object->query("SELECT username FROM comments WHERE username = '".$_POST['username']."'");

View Replies !
ERROR 1305 (42000): FUNCTION Dotproject.EFT Does Not Exist
what "ERROR 1305 (42000): FUNCTION dotproject.EFT does not exist" produced by the following means & how I fix it.

mysql> SELECT LEFT(project_name,50) AS 'Project',
-> /*== Decode Project Status == */
-> CASE project_status
-> WHEN 1 THEN LEFT('Incoming/Approval',20)
-> WHEN 2 THEN LEFT ('Planning',20)
-> WHEN 3 THEN LEFT('In Progress',20)
-> WHEN 4 THEN LEFT('QC/UAT',20)
-> WHEN 5 THEN LEFT('Complete',20)
-> WHEN 6 THEN LEFT('On Hold',20)
-> WHEN 7 THEN EFT('Archived',20)
-> END AS 'Status'
-> from projects;

ERROR 1305 (42000): FUNCTION dotproject.EFT does not exist

View Replies !
Fatal Error: Call To Undefined Function: Mysql_connect()
i have to phpBB forums, until yesterday everything worked fine until yesterday. all of a sudden i get this error message (sometimes) when browsing the forums:

Fatal error: Call to undefined function: mysql_connect() in /home/gnahrung/public_html/forum/db/mysql4.php on line 48

i haven't changed any of the phpBB-files or the databases. when i get this error and i refresh the page the error goes away.

View Replies !
Fatal Error: Call To Undefined Function Mysql_connect()
I have recently installed ,on my OS Windows 2000, Apache Server 2,PHP 5 and MySQL Server 5.0(as Windows Service-starting automatically).

Although I have passed through all steps (which I learned after reading many forum posts) to configure php.ini-recommended (including renaming and copying it to C:WINNT) and added libmysql.dll,php5apache2.dll,php_mysql.dll,etc to C:WINNTSystem32, it seems that smth weird is happening.

On my screen appears :"Fatal error: Call to undefined function mysql_connect()" when I open a php file in my webbrowser, in order to test mysql connectivity.

View Replies !
I Get Following Error Net Msg 2186 The Service Is Not Responding To The Current Control Function
I get the following error Net HelpMsg 2186

It means The service is not responding to the current control function.

Maybe I need to add in environment variable, I dunno what was the path.

I am using Windows Vista Ultimate Service pack1.

View Replies !
Fatal Error: Call To Undefined Function Mysql_connect() (creating A Database)
I downloaded PHP5 and MySQL 4.0.20A and installed them. However, I could not use my php script to create a database and got the undefined function call error. I would appreciate if someone could show me how to enable MySQL to communicate with php.

View Replies !
Fatal Error: Call To Undefined Function Mysql_connect() (PHP5, Apache 2)
currently, im using PHP 5, apache 2, and mysql 5

im trying to create my first connection to mysql using PHP

but i got an error, says Fatal error: Call to undefined function mysql_connect()

anyone how to fix this?

View Replies !
User-defined Function: ERROR 2013 (HY000): Lost Connection To MySQL Server During Query
With mysql-4.1.1-alpha, using any User Defined Function ( UDF) at the
query execution stage, on Linux 2.6, gave me the following error:

"ERROR 2013 (HY000): Lost connection to MySQL server during query"

However, upgrading to mysql-4.1.2-alpha seemed to solve the problem.

Both versions were configured exactly as follows

../configure --with-openssl --enable-thread-safe-client --with-mysqld-ldflags
=-rdynamic

The only way I could solve this was by upgrading to 4.1.2-alpha-log. Then,
recompiling the functions, drop the old UDF functions, then, recreate.
So far so good.

Anyway, if you run into this problem, or just want more detail on the sample
User Defined Functions that come with MySQL ( /sql/udf_example.cc), I've put
my notes in the following link ( TIP 27 )

View Replies !
Invalid Use
I am having a problem with group. Following is my query but it gives an error of "Invalid use of group".

SELECT refMember.MemberAcroName, refMember.MemberName, Count(DistrictLevelInformation.FormID) AS Spread
FROM (refMember LEFT JOIN MainInformation ON refMember.MemberID = MainInformation.MemberID) LEFT JOIN DistrictLevelInformation ON MainInformation.ID = DistrictLevelInformation.FormID
GROUP BY refMember.MemberAcroName, refMember.MemberName, MainInformation.qYear, MainInformation.Quarter
ORDER BY MainInformation.qYear DESC , MainInformation.Quarter DESC , Count(DistrictLevelInformation.FormID) DESC

View Replies !
Invalid Database Name
"show databases"
Code:

Databases
usernames.May2007
usernames.June2007
usernames

When I execute "use usernames.May2007" I get error:
Code:

Error 1102 (42000) : Invalid database name 'usernames.May2007'

I don't now need to keep the '..2007' databases but how do I delete them?
I get a similar error when I use drop usernames.May2007

View Replies !
Invalid Index
I try to used the MyPhpAdmin 2.8.2.4 with PHP 4.4.4, MySQL5.0.2.4 and Apcache2 and I got this error, 'invalid Index'

View Replies !
Directory Name Invalid
For testing purposes I have PHP installed and I have MySQL installed on my local laptop. Windows XP Pro

I am just learning both of them. I have read quite a few chapters in the MySQL Manual. Enough to allow me to get around in MySQL and directly create tables an view information in them, upload .txt files into the tables, etc etc.

I am receiving an error when I try to connect to MySQL via a PHP script.
I have no problem connecting to MySQL via Command Line.

The error I receive is "The directory name is invalid."

Here is my code... I am not sure where to put the directory name or where to put the directory path in order to make it valid. I am not sure what directory it is talking about.

<html>
<head><title>Connect to MySQL</title></head>
<body>
<?php
//connecting to the mysql server uses a mysql_connect command.
$link = mysql_connect("locoalhost",$_POST['username'],$_POST['password']) or die("Connect Error: ", . mysql_error());
echo 'Successfully Connected.
';
mysql_close($link);
?>
</body>
</html>

Where exactly would I put the path to the directory or where would I name the directory?

View Replies !
Invalid Syntax
I am having trouble changing my password back to OLD_PASSWORD by the following :

mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

When I do it, it says
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'OLD_PASSWORD ('newpwd')' at line 2

View Replies !
#1067 - Invalid Default Value For 'id'
SQL query:

CREATE TABLE users(
id int( 10 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ,
username varchar( 40 ) ,
PASSWORD varchar( 50 ) ,
regdate varchar( 20 ) ,
email varchar( 100 ) ,
website varchar( 150 ) ,
location varchar( 150 ) ,
show_email int( 2 ) DEFAULT '0',
last_login varchar( 20 ) ,
PRIMARY KEY ( id )
)

MySQL said: Documentation
#1067 - Invalid default value for 'id'
please help? What do i need to change. Using 5.0.51-community

View Replies !
Mysql 4: Invalid Database Name
"show databases"

Databases
usernames.May2007
usernames.June2007
usernames

When I execute "use usernames.May2007" I get error:Error 1102 (42000) : Invalid database name 'usernames.May2007'I don't now need to keep the '..2007' databases but how do I delete them?
I get a similar error when I use drop usernames.May2007

View Replies !
Invalid Argument While Using BCP (Script)
This will be a 50/50 question. It's either something that the SQL experts can answer or a scripting forum. I'm new to SQL and just coming to grips with getting familiar with scripts. I've developed a small script for my workplace that will connect to a remote server and extract the specified table that I want, zip it up and then copy it back to my local machine. This works fine until it tries to run the bcp command.
If I tivoli to the remote machine and type the bcp command in command prompt it works fine. However when executed from the script it throws an invalid argument and seems to refer to the "-" minus I place in front of the U (user) or P(pwd). The script echos the users table request to a file which is then copied to the remote server (SQLtable.cmd) and then PSEXEC is called to connect to the server and run the script. e.g. psexec \%Server% -u %user% -p %password% "C: empSQLtable.cmd"
PSEXEC then returns the following error.

C:WINNTSYSTEM32>Bcp FrontOff..SHIFT_TER_DATA out C: empdmpnlSHIFT_TER_DATA.dat ûUsa ûPpwd (chopped off the -n)
Unknown argument '¹Usa' on command line.

Sorry about all the data, just hope someone can help. Must be an easy way. The small script which psexec is executing contains two simple lines. Bcp FrontOff..SHIFT_TER_DATA out C: empdmpnlSHIFT_TER_DATA.dat -Usa -Ppwd -n
wwzip -9 C: emp\%username%SQLtables.zip C: emp\%username%*.*

View Replies !
Dropping Database With Invalid Name
I'm using MySQL 4.1.20, and I was somehow able to create a dabatase with a period in it, which I later found out is an invalid character. Well, now it won't let me drop the database or even view its contents. When I try to do anything involving it, I get the following message:

#1102 - Incorrect database name 'xxxxxxx.xxx'

View Replies !
Invalid Access To Memory Location.
I have a hosted account - I'm getting this error now..... Any reason that I can hunt down to figure out why I should be getting it?

View Replies !
Valid/Invalid Column Names
I'd like to present tabular data in HTML with the first row being the names of the columns in my database. However, I'd like them to be more presentable; for example 'I.P. Address' instead of 'ip_address'. I was wondering if a name like 'I.P. Address' could ever somehow be a valid column name or not.

View Replies !
Strip Invalid Char From Tables
Just wondering if anyone knows a way I can run a query to strip out commas from a table?

View Replies !
Table Join Invalid Query
I have this table join below and I am getting an invalid query. How can I put the 15th line ($sql .= " group.id = master.id
"; and the 17th line ($sql .= " where ".$currentrow_sql ; together. Is it even possible to do that?

View Replies !
Invalid MySQL-Link Resource
I'm getting the error message 'Supplied argument is not a valid MySQL-Link resource' (applies to the 3rd line of code) when the code below executes:

$delete_part_no_query = "DELETE FROM prices WHERE part_no == '$part_no_to_delete'";

$delete_part_no_result = mysql_query($delete_part_no_query);

$num_delete_part_no_result = mysql_affected_rows($delete_part_no_result);

The query works fine and I'm under the impression that 'mysql_affected_rows' should be used to return the number of rows affected by DELETE. However, I keep getting the above error message.

View Replies !
Is There Any MySql Function Which Is Equalent To Oracle Last_Value Function
I am converting Oracle view to MySql where I am having the follwoing syntax in Oracle
last_value(col1 ignore nulls) over (partition by col2 order by col2, col3 rows between unbounded preceding and 1 preceding)

which I need to convert to MySql.

View Replies !
Illegal Mix Of Collations :: Invalid Characters Are Coming
i have php and MySQL 4.1.11 installed on my linux box,i am getting error for mix of collation when i use find_in_set php function also some invalid characters are coming on site from db.

error is

#1267 - Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation 'find_in_set'

View Replies !
Invalid Distinct Recordset Returned On An Indexed Column
I have a table with about 1.2 million records. I have an index set on a column.

For close to two years, this query has worked perfectly fine:

SELECT DISTINCT `Mgmt_Area` as thevalue, `Mgmt_Area` as valueid from qcdata ORDER BY thevalue

Note, this is a programmatically generated query based on some user selections. This query actually is used to create a listbox. The index has 62 separate values.

This query would usually return: Code:

View Replies !
Importing CSV :: Invalid Field Count In CSV Input On Line 1
I was able to import a csv file without any problems, until my server updated phpmyadmin from 2.6.4 pl2 to 2.8.02. now when I try to import the same file I get the following error.

Error:
Invalid field count in CSV input on line 1.

View Replies !
Error Message Warning: Printf() [function.printf]
In my php code i have...


<?php
mysql_connect("localhost", "my-username", "my-password") or die(mysql_error());
mysql_select_db("my-database") or die(mysql_error());
$result = mysql_query("SELECT * FROM beavers_news ORDER BY posted DESC");
if ($row2 = mysql_fetch_array($result)) {
do {
Printf("<table width='100%'><tr><td>%s</td></tr><tr><td>Posted: %s</td></tr><tr><td>%s</td></tr></table>", $row2[title], $row2[posted], $row2[news]);
}while ($row2 = mysql_fetch_array($result));
}else{
echo "There is no news!";
}
?>


And i add news into the mysql database, but when i go to view the page i get the following error message...

Warning: printf() [function.printf (http://www.southwaterseascouts.org/scouts/news/function.printf)]: Too few arguments in /home/sites/southwaterseascouts.org/public_html/scouts/news/index.php on line 55

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved