-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
http://bumptop.com/ anybody heard of it? More importantly, anybody beta testing it right now? Thoughts? I signed up for the beta test because it looks interesting. I'm always on the lookout when it comes to computer/internet UI's. I was just thinking how cool it might be to couple this with a tablet pc or those new all-in-one touchscreen computers...
-
well i don't know. those are your cols/vars from your post. I just changed your query string around to the right order.
-
please don't make multiple threads asking the same thing. You already had a thread asking about this. You were redirected to the regex forum where you posted the same question. Now this one, asking the same thing. Asking the same thing over and over in multiple threads will not get your problem solved any faster. thread closed.
-
okay well post what you tried to do from that example I gave you...
-
well that's all good and well but maybe I'm reading that wrong but I think you're doing a whole bunch of extra stuff there you don't really need to be doing... if you give some example output I bet we could find a much shorter way
-
"SELECT * FROM news_main WHERE newsitem=newsitemID ORDER BY cat, title DESC ";
-
well i think you need to change $links[] = to $links .= but am i reading that wrong or are you using a loop to make a comma separated list, only to explode it into an array, and then loop through it to create another array, and then implode it into a string?
-
strip_slashes
-
would help if you showed your query string...
-
well in reality since the data is coming from a database table, you're probably gonna wanna use sum() in your query for example: info id col1 1 10 2 15 3 8 2 13 2 50 $sql = "select sum(col1) as total from info where id = 2"; $result = mysql_query($sql); $total = mysql_result($result, 0, 0); echo $total; // output: 78
-
well it looks like you are setting all of your element keys to the same thing in your $products = array($p=>1,$p=>2,$p=>3,$p=>4,$p=>5,$p=>6); so it's just overwriting each other so in the end all you are really doing is making an array with 1 element $products = array($p => 6);
-
array_sum() ftw?
-
return an array instead of individual vars. // example function function something () { $blah['board'] = mysql_real_escape_string(intval($_GET['board'])); $blah['topic'] = mysql_real_escape_string(intval($_GET['topic'])); $blah['message'] = mysql_real_escape_string(intval($_GET['message'])); $blah['page'] = mysql_real_escape_string(intval($_GET['page'])); return $blah; } // example call to function $vars = something(); // example use of individual var echo $vars['board'];
-
so...what are you really wanting? The total amount of something from a column in a table? The total amount of some column, restricted by some where clause?
-
yeah...you're going to have to be more specific here. For instance, you say you want it to be "running" even if the user isn't logged in, but then you say that you want some value in a table to be incremented whenever some script is run. Is this the login script, as in, every time the user logs in, you want a value in a table incremented? If so, I don't really see why you would need it to be "continually running." Or are other users somehow able to increment this user's number? Or is this number even associated to a specific user? How is the number supposed to go down? Do you want the script itself to increment the number every x amount of time and then the number is decreased based on some action by the user? Come on man, we aren't psychic. You need to be very detailed even providing examples.
-
umm, well sessions are a hell of a lot more secure than cookies... but they do only last for as long as the browser is open so if you are looking for something more permanent you will have to store information in a flatfile or database on the server. But fyi even sessions use cookies by default the session id is stored in a cookie on the client so you will have to look into using sessions without cookies (basically you pass the session id through the url or temp store it in a flatfile or db)
-
MYSQL: Finding highest column value from a particular row
.josh replied to andrewgarn's topic in PHP Coding Help
$id = 3; // example $sql = "select * from table where id = $id"; $result = mysql_query($sql); if ($result) { $nums = mysql_fetch_assoc($result); arsort($nums); } -
perhaps they are not properly setting their browser to allow cookies, despite you telling them to allow them? I don't think there's anything else you can do, except maybe provide detailed instructions on how to allow it for their browser. I'm not sure whether psp allows cookies or not, either... I guess your only alternative is to redesign your system to not use cookies at all. edit: a quick google search shows that psp does indeed allow cookies and there's no special "method" to setting them and allowing them from the menu is pretty straight forward.
-
Hey I'm sure if you're a java programmer living in Ireland you'd be setup for sure, but I am comparing the whole world here...I'm just saying...you gotta consider how many programmers there are in Ireland vs. the whole rest of the world...and the fact that that 90k euro a year market is restricted to just Ireland...
-
#1 has been shown to you, we have no idea how you have your code setup so we can't tell you what to use for #2, and you were pointed in the right direction for #3. We don't write code for you. We help you fix your own code. If you wish for someone to write it for you, post in the freelance section (read the stickies first).
-
umm we're comparing java to php not flash... and anyways, don't get me wrong, I'm Irish. Irish Pride, RAWR! But I hardly think Ireland constitutes any kind of significant data for java programmers...
-
well for instance if you wanted the default id to be 1: if (!$forums[$i]['last_post_user_id']) { $forums[$i]['last_post_user_id'] = 1; }
-
And you shouldn't be getting either one of those. That's the GET method. You've changed to the POST method. So you shouldn't be getting any name='s in your url. The %..% is added to your query string it's not passed from your form from any method.