This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Page id didn't work
#1

Hey,

i have this code :

Code:
$cmtx_page_id = $id;
$cmtx_reference = $row[name];
$cmtx_path = "comments/";
define('IN_COMMENTICS', 'true'); //no need to edit this line
require $cmtx_path . "includes/commentics.php"; //no need to edit this line

$id = $_GET['id'];

URL : script.php?id=5

in the MYSQL Database is always the false page id .. from 1 next to 5 ..

Only i have this bug?

Mfg
Reply
#2

Hi,

Can you explain what you mean:
(21-Nov-2012, 06:43 PM)Koksi Wrote:  always the false page id .. from 1 next to 5 ..

Have you completed the interview?
Reply
#3

the script.php?id=51 and the page id in the database is for example 3
Reply
#4

There are two ID related columns in the pages database table.

One is called 'id' and the other is called 'page_id'.

The 'page_id' stores the $cmtx_page_id value, in your case 51.

The 'id' is an auto increment column, so it may be 3 in your case.

Have you completed the interview?
Reply
#5

I have noticed that in the comments table the page_id is a number.
in pages table the page_id is a string and the id is a number
WHERE comments.page_id = pages.id
but comments.page_id != pages.page_id

seems like an odd naming structure, but that is how it works for me.

I believe the $cmtx_page_id is looking for a string that matches the pages.page_id not the pages.id or the comments.page_id

if you are trying to write a query to get comments or ratings about a page, then you should JOIN the tables WHERE comments.page_id = pages.id

I hope this helps!
Reply
#6

(21-Nov-2012, 08:57 PM)Steven Wrote:  There are two ID related columns in the pages database table.

One is called 'id' and the other is called 'page_id'.

The 'page_id' stores the $cmtx_page_id value, in your case 51.

The 'id' is an auto increment column, so it may be 3 in your case.

i know.. but the page_id is not an increment auto column and is not 51..
Reply
#7

I want to tag a comment counter in another div. I wanted to include the Comments table with the Page ID but it doesnt work.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by PERSIAN
26-Nov-2012, 10:00 PM
Last Post by Steven
15-May-2012, 11:56 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)