mapleleaf
Members-
Posts
250 -
Joined
-
Last visited
Never
Everything posted by mapleleaf
-
General question - jument? - not sure what this is
mapleleaf replied to xtiancjs's topic in Frameworks
sounds like a personal prefix. Nothing more. -
Help with getting comments count and article category in Codeigniter
mapleleaf replied to misheck's topic in Frameworks
I think you want the total comments per category. Anyway it seems you just need a function in the modal for the query you want as you can't use the function that requires an id. By the way the codeigniter forum is exellent. -
two tables company_id company_name contact_id company_id contact_name
-
I think this will do it: mysqldump --no-data --tables -u YOUR_USER_NAME -p DATABASE_YOU_WANT_SCRIPTED >> FILENAME.sql
-
Have you echoed out $data to see what you get?
-
$query = "SELECT * FROM forum_forums"; $result = mysql_query($query) or die(mysql_error()); $count = 0; while($row = mysql_fetch_array($result)) { extract($row); $total = $row["topics"] + $row["posts"]; $count = $count + $total; } echo $count; //should be your ultratotal
-
No @ is allowed in varchar so not that echo out your $email variable and see what you get
-
UPDATE `articles` SET second_theme = REPLACE(second_theme,', ',',') is what I needed. Again thanks to PFMaBiSmAd
-
SELECT REPLACE( 'second_theme', ', ', ',' ) FROM articles is what I am running in phpmyadmin but it doesn't seem to do anything yet it says all rows have been affected
-
varchar(15) won't be enough for email
-
Spot on PFMaBiSmAd!! A good pair of eyes are hard to come by. Much appreciated. Now I have the fun of fixing all the records. Code that made them was the easy bit
-
Where is this set? $page['id'] maybe it is an array and it should be $page[0] depending on where in the array it is.
-
SELECT * FROM articles WHERE FIND_IN_SET(32, second_theme) AND user_name = 'Ram' AND deleted = 'No' ORDER BY date_added ASC gives no results SELECT * FROM articles WHERE FIND_IN_SET(32, second_theme) AND user_name = 'John' AND deleted = 'No' ORDER BY date_added ASC gives results Ram's second_theme: 58, 32 49, 46 49, 32 20, 1, 58 1, 58, 32 58, 32, 41 46, 32 48, 32 9, 41, 32 48, 32, 41 48 20, 41 48, 32 14, 8, 32 John's second_theme: 2, 4, 41 18 14 45, 9, 8 48,32,8 12 6 2, 9, 48 8 9, 48, 41 5, 13, 34 30, 3, 48 9, 3 14, 61, 8 52 52 46,15,3 2 12,32 Any ideas why this might happen?
-
What is your error?
-
SELECT * FROM articles WHERE (theme_id = 34 OR find_in_set(32, second_theme)) AND deleted = 'No'; Is what I needed.
-
If you put a fulltext index on the Description MYSQL will sort by relevance. http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
-
I think you may want find_in_set($_POST['keyword'], column_name);
-
Getting an odd error with this. SELECT * FROM articles WHERE FIND_IN_SET(32, second_theme) AND deleted = 'No' //gives 16 rows SELECT * FROM articles WHERE theme_id = 34 AND deleted = 'No' //gives 13 rows SELECT * FROM articles WHERE theme_id = 34 OR find_in_set(32, second_theme) AND deleted = 'No' //gives 32 rows because 3 of the rows have 'Yes' for deleted. SELECT * FROM articles WHERE theme_id = 34 AND find_in_set(32, second_theme) IS NOT NULL AND deleted = 'No' //gives 13 rows so basically excludes all the second_theme I want to to be able to do the OR and then the AND conditions should be applied the results of the OR. Tx
-
I am trying to get this to work: SELECT * FROM articles WHERE (SELECT * FROM articles WHERE theme_id = 10 OR FIND_IN_SET(9, second_theme)) AND name = 'john' AND deleted = 'No' My error is: Operand should contain 1 column(s) What is the way around this? This query is dynamic in that multiple ANDS are sometimes added.
-
Put all the book ids in a comma separated string and then use Find_in_Set on your new query.
-
$i = 0 ; foreach($refnr as $new){ if ($new == $senr[$i]) { $i++; //do something } }
-
Can you not do ORDER BY Expiry? Why cast?
-
Put the $email in the FROM and I think you need to remove the ' from either side of $email. Also the you need to set the $email variable before adding it to the $headers
-
You can use javascript: <a href="#" onClick="history.go(-1)">Back</a> <input type=button value="Back" onClick="history.go(-1)">