son.of.the.morning
-
Posts
292 -
Joined
-
Last visited
Never
Posts posted by son.of.the.morning
-
-
Am adding text with paragraphs into my database but when i view that data on another page it's just one big block of text. :S Anyone no how i can stop this?
-
Can this me done guys?
-
This obv seems simple from the title, hoverever i dont want to just had text into a text area i want to be able to add in addition to what the user has already input.
example when you like the code button on this form the '[ code ][ /code ]' text comes up. this is exacly what i want. any one have any idea's?
-
it's not realy the form i have an issue this it's when the article is viewed i want to be able to check the article body for something like [ quote ] [ /quote ] and if it finds it wrap it in a tag with a class so i can have a difrent style applied to it
-
I would like to apply some addition functionality to a form which add news records into the database. Basicaly what i want is similar to what this forum does with the [ code ] [ /code ] but what i want for the user to be able to add [ quote ] [ /quote ] and when the post is viewed then that specific area of the acticle body will be formated diffrently. I hope this makes sence.
-
Thanks man. Silly question i guess just wanted to make sure.
-
I want to query the five heighest values in a coloum but the coloum is not the primarykey.
i.e: i have a coloum on the end of my table (articles) called views which get updated when ever an article is viewed by adding 1. On anther page i want to be able to view the 5 most viewed articles.
-
Thanks man i shall get to work then
-
Alright guys i have an idea on what am going to do here, although i am unsure that it's the best way to go about it.
I am creating a blog and i need to count how many views an article gets in order to display the top 10 most viewed articles. Here is my plan...
1. Add an additional field to my blog posts table called viewed
2. On the view article page have an update method that adds one to the current number on the the coloum viewed
3. When displaying the 10 most viewed articles query it by the heightest number and limet to 5
-
Wow your a bell end!
-
Finally it works, thank you guys! hahaha sorry for the poor explanations!
-
Getting an error now.
this is my code
$a = mysql_query("SELECT COUNT(*) FROM blog_posts WHERE category_id = 1")or die(mysql_error()); $b = mysql_fetch_assoc($a); echo $b['0'];
-
I tryied the first one and i kept getting "Resource id #7 " thats returned
i dont no how to put Pikachu's one in as i dont under stand it i want to specify a number my self to check you see
-
how many items share that category_id
-
Sorry man.
Table
id
title
body
category_id <<<<< i want to see how many records in this coloum have the same value
date
-
I really dont have a clue about this right now. I need to be able to say how many records in this colum have the value of 2. then i need to get that number by it's self into a var.
-
I dont think you understand me. It doesnt matter how many tables are laid out i am only querying one table. I want to count the amount of rows that have the same category_id.
-
this is helpful fo course but it's not what am trying to do. I dont want to show the relation between two tables even though they are. All i want to do if to be able to count how many records have the same content.
for example if you have category_id which can have more then one record with the same id in. I want to be able to say how many records in the table have the same category id. Hope this makes sence
-
have you an exaplme with out the join?
-
Is there a php method/function that can count how many records in a table have the same id. For example you have two tables relating to one another there for there is reason for a coloum to have the same id as another.
-
YES! I have it working at last . I cant thank you enough for you help this has been head fucking my head all night!
if(isset($_POST['sub'])){ if (!empty($_FILES['image']['name'])) {
this is what i used in the end!
-
It works fine but it's displaying the error on the initial loading of the page before anything has been submited
-
Firstly I would like to thank you for that it did work, however i want to be able to provide an error when the file form is empty. It has canceled out the the class error but i don't how to apply a new one. Sorry if i am not making to much sense here i am quite new at this.
-
Yes. The form works fine it's just if i submit it with no file in the FILE form object then it uses a error handler from the class. I don't mind the actual error that the class creates but oddly enough everything else on my page vanishes. That's why i want it to be checked and handed in the view point before the class is included to prevent it generating an error.
When inserting allot of text into a record breaks are not showing
in PHP Coding Help
Posted
invoking the class
The Insert Class
The View point