Internal server error 500

Claraviolet
Akatsuki

Well, I have been trying some stuff for the post count and such but the queries that worked before with mybb 1.8, are not working anymore and they are resulting in an internal server error

Here are the queries:
$timecut = TIME_NOW - 86400;
$query = $db->simple_select("posts", "COUNT(*) AS newposts", "dateline > '$timecut' AND visible='1'");

$newposts = my_number_format($db->fetch_field($query, "newposts"));

Well then, I don't know php but I thought the db was taking stuff from posts table with the alias name newposts and the timecut is like a where clause, so I have tried the following query,

$query = $db->simple_select("select count(*) from posts as newposts where dateline>$timecut and visible='1'");

It's not working either. Can someone help me how to make this work? Also, I would like to know if my_number_format is actually converting the query into a number data type.
Thanks in advance guys.
[Only registered and activated users can see links Click here to register] [Only registered and activated users can see links Click here to register]

[Image: YqKb33u.png?1]


[Only registered and activated users can see links Click here to register]
Reply
Adidas
Member

Is this thread limited to moderators/administrators or anyone who has expertise in php?

Reply

Claraviolet
Akatsuki

(09-25-2016, 07:28 PM)Adidas Wrote: Is this thread limited to moderators/administrators or anyone who has expertise in php?
 I would love to receive help from anyone ^^
Admins and mods are not really that special in this forum ^^
So, do you know any php adidas? o.O

[Image: YqKb33u.png?1]


[Only registered and activated users can see links Click here to register]
Reply
Adidas
Member

(09-25-2016, 08:29 PM)Claraviolet Wrote:  I would love to receive help from anyone ^^
Admins and mods are not really that special in this forum ^^
So, do you know any php adidas? o.O
Yeah I know some php. Have to look over your code to see if I can work some kinks out

Reply
Star_Of_Hope
Akatsuki

(09-25-2016, 08:55 PM)Adidas Wrote: Yeah I know some php. Have to look over your code to see if I can work some kinks out

That's the above code she is talking about and if I remember correctly that code belongs to index.php file.

[Image: 6bc972f0df4d014940d3f6dfd1a3a9be.png]]
Reply
Ace
Retired Staff

(09-25-2016, 08:29 PM)Claraviolet Wrote: [Only registered and activated users can see links Click here to register]

I personally don't know much about coding but i do look into it for future reference

Reply
Star_Of_Hope
Akatsuki

(09-25-2016, 08:59 PM)Ace Wrote: [Only registered and activated users can see links Click here to register]

I personally don't know much about coding but i do look into it for future reference
That site is for programming right?
For us though it's better to contact the support of mybb

[Image: 6bc972f0df4d014940d3f6dfd1a3a9be.png]]
Reply
Ace
Retired Staff

(09-25-2016, 09:09 PM)Star_Of_Hope Wrote: That site is for programming right?
For us though it's better to contact the support of mybb
possibly i' honestly didn't think of that hah

Reply
Star_Of_Hope
Akatsuki

(09-25-2016, 09:13 PM)Ace Wrote: possibly i' honestly didn't think of that hah

Well, if I haven't been observing claraviolet, I wouldn't have know.
So, it's fine.

[Image: 6bc972f0df4d014940d3f6dfd1a3a9be.png]]
Reply
MelloLily
Retired Staff

I'll have to pass on this, not my area of expertise.

Reply


Users browsing this thread:

1 Guest(s)