Ask a Question related to Dreamweaver AppDev, Design and Development.
-
flaminhoon #1
Mysql help please
Hi I have written this SQL query, but there is something wrong somewhere, it
crashes my server, maybe its looping somewhere. What Im trying to do is show
the number of comments (comments table) there were left an and article
(contents table) If anybody could give me a pointer I might save whats left of
my hair. Thanks in advance. Steve Here is mu query using PHPDEV apache server
php 4. MYSQL SELECT COUNT(comments.contents_id), comments.contents_id,
contents.contents_id, contents.description,
contents.image1,contents.owner,contents.dateinsert FROM contents LEFT JOIN
comments on contents.contents_id = comments.contents_id WHERE contents.isit =
'-1' GROUP BY comments.contents_id ORDER BY contents.contents_id DESC
flaminhoon Guest
-
#40471 [NEW]: PHP 5.2.1 failed to be compiled with MySQl 5.0.33, MySQL 5.0.27, MySQL 5.1.15
From: pcdinh at gmail dot com Operating system: CentOS 4.4 PHP version: 5.2.1 PHP Bug Type: Compile Failure Bug description:... -
#40207 [NEW]: Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL ser
From: arif at peshawaronline dot com Operating system: PHP version: 4.4.4 PHP Bug Type: Compile Warning Bug description: ... -
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
When i try to start my mysql server, i get this error ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'... -
Seen this message? Can't connect to local MySQL server through socket '/tmp/mysql.sock'
Seen this message? Can't connect to local MySQL server through socket '/tmp/mysql.sock' I got this trying to install DBI and DBD for mysql from... -
Seen this message? Can't connect to local MySQL server throughsocket '/tmp/mysql.sock'
Allen Marshall wrote: I just saw it in another newsgroup. Don't multi-post! -- Gunnar Hjalmarsson Email:... -
Michael Fesser #2
Re: Mysql help please
.oO(flaminhoon)
Crashes in what way? MySQL always creates error messages if something is>Hi I have written this SQL query, but there is something wrong somewhere, it
>crashes my server, maybe its looping somewhere.
wrong. Check mysql_error() if mysql_query() fails to execute the query.
What happens when you run the query directly at the MySQL prompt?
Of what type is contents.isit? The value looks numeric, why is it>SELECT COUNT(comments.contents_id), comments.contents_id,
>contents.contents_id, contents.description,
>contents.image1,contents.owner,contents.dateinser t FROM contents LEFT JOIN
>comments on contents.contents_id = comments.contents_id WHERE contents.isit =
>'-1' GROUP BY comments.contents_id ORDER BY contents.contents_id DESC
quoted?
Micha
Michael Fesser Guest
-
flaminhoon #3
Re: Mysql help please
There are no errors, the page just executes really slowly, it wouldnt work at
all before . this is my latest attempt at the SQL this is the page
[url]http://www.whitefriars.com/isit_list.php[/url] SELECT contents.contents_id,
contents.description, contents.isit_approved,
contents.image1,contents.owner,contents.dateinsert , COUNT(comments.contents_id)
FROM contents LEFT JOIN comments on contents.contents_id = comments.contents_id
WHERE contents.isit_approved = '-1' GROUP BY comments.contents_id,
contents.contents_id, contents.description,contents.image1,
contents.isit_approved ORDER BY contents.contents_id DESC :confused; Any ideas
anybody? Thanks Flaminhoon
flaminhoon Guest



Reply With Quote

