Spring
Members-
Posts
224 -
Joined
-
Last visited
Everything posted by Spring
-
Normalize the tables as Pandemikk said. I have done so.
-
Actually yes. I hope you're referring to the normalization. Besides, the LIKE %33% isn't quite right. What do you suggest rather than LIKE %33%
-
Appreciate it! This isn't my table, I'm working with an old script so any advice helps!
-
my table has id, user_id, User_item_ids and User_item_shop_id Is that bad? And I'll try what you've suggested.
-
So here's my problem I'm not sure how to approach this: I have a table with user_items which are stored together separated by commas. 13,12,11,9,27,15,16,22,21,23,24,26,29,30,31,32,33 Now, I have a script where the user is in a trade and I want to verify the item they are trying to trade, but is there an alternative other than grabbing all of that users' items and checking that one item with all of the records? I've tried using SELECT * FROM MYTABLE WHERE user_item_id IN(33) As an example to see if it will pull the rows with that ID. It didn't seem to work, am I doing it wrong? if so, forgive me. Any suggestions/help? The main problem is I don't want to have to explode that data and use a foreach to check that one item against all of that users items, as they could have well over 500.
-
DOH! I found out the small mistake I made, sorry for wasting anyone's time.
-
No. MD5 is just outdated. Add salt. http://www.phpfreaks.com/forums/index.php?topic=254277.0
-
function getCategoryName($cRow[0]) you don't call a function like that.
-
Looks correct to me, you can try this if you want. $("input").live("click", function(){ $(this).addClass("focus"); }); Also there could be another part of your Jquery incorrect that's breaking the script.
-
Post the code if you want help.
-
Mind posting the whole code?
-
Any errors? error_reporting(E_ALL); ini_set('display_errors', '1'); Maybe it's your permissions?
-
Ok. $target = AVATAR_UPLOADPATH; What is AVATAR_UPLOADPATH; set to then? Ah I see it.. So..where is this file located? Is it in the root directory?
-
What's the problem though? What error are you getting with yours?
-
Did 'ya set up the DB connect correctly? Where is $dbc defined?
-
$sql_quest = 'SELECT id, username FROM user ORDER BY id ASC LIMIT '. $my_int_value . ',' . $my_int_value + 30'; How's this? Are you getting an error? Can 'ya post it?
-
Then why does it extend the CI_Controller ? That's the fix that I made, but while I have you I do have another problem.. This code is almost directly from the user_guide find on the website, but my CI doesn't recognize the library..Am I better off asking on the CI forums? Or do you think you can give it a go? The error is the same as above. $config['image_library'] = 'gd2'; $config['source_image'] = '/ci/images/port/threechan.png'; $config['create_thumb'] = TRUE; $config['maintain_ratio'] = TRUE; $config['width'] = 75; $config['height'] = 50; $this->load->library('image_lib', $config); echo $this->image_lib->resize(); Jesus never, I'm just not going to program late night, thank you.
-
Well, In my DB i have user items as follows: 13,12,11,9,27,15,16,22,21,23,24,26,29,30,31,32,33 Each ID is a user item that has been imploded to be sent to the DB. Well, I', trying to take them out of the DB now, and I'm having a small problem turning them back into integers. Here's what I've done. $items = explode(",", $row['user_item_id']); So I get: 0 => string '13' (length=2) 1 => string '12' (length=2) 2 => string '11' (length=2) 3 => string '9' (length=1) 4 => string '27' (length=2) 5 => string '15' (length=2) 6 => string '16' (length=2) 7 => string '22' (length=2) 8 => string '21' (length=2) 9 => string '23' (length=2) 10 => string '24' (length=2) 11 => string '26' (length=2) 12 => string '29' (length=2) 13 => string '30' (length=2) 14 => string '31' (length=2) 15 => string '32' (length=2) 16 => string '33' (length=2) Then I do this: foreach($items as $item){ var_dump($item); $sql = 'SELECT * FROM `MYTABLE` WHERE item_tab = '.$tab_id.' AND item_id = '.$item.' AND item_pose =0'; } and get this: string '13' (length=2) string '12' (length=2) string '11' (length=2) string '9' (length=1) string '27' (length=2) string '15' (length=2) string '16' (length=2) string '22' (length=2) string '21' (length=2) string '23' (length=2) string '24' (length=2) string '26' (length=2) string '29' (length=2) string '30' (length=2) string '31' (length=2) string '32' (length=2) string '33' (length=2) Now, this works how I want it to except, I want a integer value not a string. What would be the best way to approach this?
-
If none above show text... problem is it shows text even so.
Spring replied to Matt Ridge's topic in PHP Coding Help
Well, I'm officially confused. Going to hand this over to someone else. -
The entire page is blank?