-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
quick help with a directory path issue when uploading an image ..
Zane replied to imarockstar's topic in PHP Coding Help
using getcwd() will get you the Current Working Directory (cwd) which is why it uploads to the scripts directory echo out $destination_path play around wiath what that outputs to change it -
you are missing a semicolon here $mysql = mysql_connect("127.0.0.1", "root", "")
-
what is the datatype for thedate in your table
-
Unless you have a user membership system setup...then you'd need a table for visits/selections In the table you would have - their ip - their month choice (using a number) .....that's pretty much it. Then in your dropdown box creation... you'd search the table by the current users IP and take the month choice.. if it's 0 then they haven't chosen anything....or if their IP isn't found else .... echo the word selected in your while loop
-
http://www.mattcutts.com/blog/google-chrome-user-agent/
-
-
so what's getsales.php look like then.
-
My bad, I meant for it to be SELECT a.* FROM products a INNER JOIN categories b ON a.in_category = b.id WHERE b.name NOT LIKE '%free%' notice the a.* that way you don't get all the columns from categories too.
-
SELECT *.a FROM products a INNER JOIN categories b ON a.in_category = b.id WHERE b.name NOT LIKE '%free%'
-
The code in thickbox.js http://vacation-tips.awardspace.info/thickbox.js seems to have a typo or something... imgPreloader = new Image(); imgPreloader.onload = function(){ ///This should be closed somewhere, I can't find it imgPreloader.onload = null; //This should go before the line above. // Resizing large images - orginal by Christian Montoya edited by me. var pagesize = tb_getPageSize(); var x = pagesize[0] - 150; var y = pagesize[1] - 150; var imageWidth = imgPreloader.width; var imageHeight = imgPreloader.height; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; } } else if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; } } // End Resizing
-
The real question is HOW are you communicating with this serial device....there's apparently a bug in the way you're receiving the data.... The first weighing gave you 22 of the same number The second weighing gave your 34 and the third is either 52 53. I don't see the pattern....this seems like a bug. What code are you using to retrieve the string EDIT: Nevermind, I didn't even notice the above post with the code in it. What does ser_read() do? I've never seen that function before and it's not in the manual.
-
Proper syntax for if not exists, insert, else, update query?
Zane replied to Fog Juice's topic in MySQL Help
well, back to your question then.. syntax of what...SQL? I assumed what you wrote in the op post was pseudo code. It didn't appear to me as any SQL I've dabbled in. Perhaps someone else has used the functions BEGIN or END http://forums.mysql.com/read.php?10,251666,251670#msg-251670 -
Proper syntax for if not exists, insert, else, update query?
Zane replied to Fog Juice's topic in MySQL Help
Well pardon me, I guess I won't write you anymore free code examples either. -
Proper syntax for if not exists, insert, else, update query?
Zane replied to Fog Juice's topic in MySQL Help
$connect = mysql_connect($domain, $user, $pass); mysql_select_db("yeoledatabase'); $serverid = 1; $gid = 575; $test = mysql_query("SELECT COUNT(*) as x, id FROM games_linked WHERE game_id = $gid") or die(mysql_error()); $result = mysql_fetch_array($test); if($result[0] == 0) { echo "Appending to Database"; $sql = "INSERT INTO `games_linked` (`server_id`,`game_id`) VALUES ($serverid,$gid)"; } else { echo "Updating"; $sql = "UPDATE `games_linked` SET `server_id` = $serverid WHERE `game_id` = $gid"; } $query = mysql_query($sql) or die(mysql_error()); -
you have to echo/print something in order for it to display....probably why it displays nothing
-
Changing forums Need help transfering post from MySQL database
Zane replied to JamesThePanda's topic in Applications
This is not the SMF Support Forum. You can find that at http://www.simplemachinesforum.org/community/ They'll most likely be able to help more than we can -
$this->hello($arg);
-
[SOLVED] Using Yes/No <Input> with a Dynamic Recordset problem?
Zane replied to A JM's topic in PHP Coding Help
with PHP for($i=0; $i echo '\n'; echo '\n'; } That would create 50 sets of Yes No radio buttons.....that work. -
you're probably missing an end bracket just add another one to the end
-
[SOLVED] Using Yes/No <Input> with a Dynamic Recordset problem?
Zane replied to A JM's topic in PHP Coding Help
yeah they can't ALL be named chk_accept[] you need them like -
which line is it..which one is 88
-
Hell yeah, lets get that
-
need onmouseover onmouseout onclick all together
Zane replied to sandbudd's topic in Javascript Help
why would you put the entire HTML file without code tags....and that small CSS file in them in another post? EDIT: nevermind..I see you just missed the ending code tag