Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#php

26 December 2007


Total 27 pages. You are browsing page 1/27.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

--- Log opened Wed Dec 26 00:00:48 2007
00:06 <****> http://rafb.net/p/7NkA0F90.html I'm getting two instances of "Warning: mysql_result() [function.mysql-result]: Unable to jump to row 3 on MySQL result index 3 in /home/craig/www/purchase-orders/index.php on line 46" What's the error? This same script is running fine on another box.
00:07 <****> does that other box accesses the same database (with the same data in it?)
00:08 <****> craigbass1976: Simple answer: You're trying to look into inexisting entry
00:08 <****> Not the same database, but I did a mysql < xxx.sql on each so it is the same data and table layout
00:09 <****> layout != data
00:09 <****> hm
00:10 <****> craigbass1976: You're still trying to look in the unexisting entry.
00:11 <****> unexisting eh?
00:12 <****>function_inside_class() ? o_O
00:12 <****> I've tried global $foo as well, still no good.. what am I doing wrong?
00:13 <****> pastebin Zelest?
00:14 <****> I guess I don't understand then why it works on one box and not the other when there are identical databases
00:15 <****> ThinkMedical, oh god, nevermind.. it was just a silly typo ;)
00:15 <****> ThinkMedical, thanks though ;)
00:15 <****> It does return the three rows first, then the error twice
00:15 <****> Other columns (css columns) where the queries are searching and there is no data, I jsut get the error twice
00:16 <****> craigbass1976: Um... DUH
00:17 <****> hi
00:17 <****> hi
00:17 <****> Um, duh what? On the other box, I get just blank, no error. see parkershouse.homelinux.org/purchase-orders/
00:18 <****> can anyone tell me how i can do a preg_match for the | symbol (it can be there or not
00:18 * Wolfpaws sets a big sign
00:18 * Wolfpaws sets a big sign; Don't use mysql_result
00:18 <****> \|
00:18 <****> Wolfpaws, well, what do I use instead?
00:19 <****> mysql_row
00:19 <****> mysql_fetch_assoc
00:19 <****> Is this the difference between php/mysql/apache on ubuntu vs. cent maybe? Works in cent, and I'm on an ubuntu box right now
00:20 <****> craigbass1976: I doubt it actually works in the first place.
00:21 <****> Did you go to the link?
00:21 <****> There it is working
00:22 <****> craigbass1976: run them with the same data
00:22 <****> only way to really test if both are behaving the same way
00:22 <****> for instance, pass the small test db that doesn't work to the "working" site
00:23 <****> if it still works on the working site, Wolfpaws will buy you a beer
00:23 <****> (unless on the working site the same error is triggered but you get a wsod instead of the error)
00:24 <****> Hmmm. I jsut did another dump from the working site and copied it ot this one, same error. I'll try the other way.
00:24 <****> i wouldnt do that
00:24 <****> youll overwrite what you claim is working
00:24 <****> Both are test boxes, so it doesn't really matter
00:25 <****> There is a total of about five rows of data in the db
00:26 <****> i think i just remade 4chan :P
00:26 * Ln curses herself for the minutes wasted
00:27 * krustofski thinks that was an attempt at a joke
00:27 <****> krustofski, i wish
00:28 <****> i was making a bbs that allowed limitless commenting on top of commenting (w\ image support)
00:28 <****> Ln: you mean you made a image repository of random shit?
00:28 <****> whoops excuse my language
00:29 <****> I got my friends to test for two weeks and it ended up looking like /b/
00:29 <****>_<
00:29 <****> Ln: source code or it didn't happen.
00:29 <****> heh
00:30 <****> www.pastebin.ca/832227
00:30 <****> what?
00:30 <****> you're serious?
00:30 <****> :)
00:31 <****> may god have mercy on your soul.
00:31 <****> Ln: you should start a sourceforge/freshmeat project.
00:31 <****> lawl
00:31 <****> that would lead to the decline of the internet though :P
00:32 <****> that is absolutely horrible. :|
00:32 <****> krustofski, the code?
00:32 <****> yes
00:32 <****> :-/
00:32 <****> lol
00:33 <****> upon looking at it, i notice there is no image support, one sec
00:33 * Ln actually has a versioning system for this :P
00:33 <****> ..wow
00:34 <****> so how would i add | symbol to a current hash?
00:34 <****> pregmatch
00:35 <****> i guess i want to include ? to show that it CAN be present but doesnt have to be
00:35 <****> wow i never use omg, but omg
00:35 <****> Mr_X: why don't you paste your current code so we can look at it instead of describing it in clumsy ways?
00:35 <****> this disdain for single quotes is amazing
00:36 <****> Huh
00:36 <****> /^[a-z]\w+$/i
00:36 <****> and where do you want to add a |?
00:37 <****> the symbol can be anywhere
00:37 <****> the idea is so it can be present but isnt required
00:38 <****> Mr_X: What exactly do you want to do?
00:38 <****> then you might try /^[\w|]+$/i
00:39 <****> create a pregmatch that will have alphanumerics and -_| symbols
00:39 <****> then you might try /^[\w|_-]+$/i then
00:40 <****> hmm how would i come across making a form where a user can enter his workhours? timestamp seems not to be enough... my problem is more f the logical type: how would i calculate the workhours from a "starttime" (08:30) and "endtime" (17:00) and still make have it to remember starttime/endtime (for editing)? :S
00:40 <****> yango: Keep in mind that \w also includes (IIRC) space, dot and international characters
00:41 <****> then you might try /^[a-z0-9|_-]+$/i then
00:41 <****> :)
00:41 <****> That's better :]
00:41 <****> risc: not sure i understand you, but you can subduct the timestamps and then divide by ie 3600 for the hours
00:43 <****> subduct?
00:45 <****> subtract :) sry
00:45 <****> subduct is much more fun
00:45 <****> risc: what's 'it'? you just remember the starttime/endtime and use a function to calculate the workhours (or store the three values and have a trigger to update the third col)
00:45 * krustofski watches Wolfpaws subduct a tectonic plate for lunch
00:46 <****> ex: for december 28th 2008 an employee enters "started working"="08:00" and "ended working"="17:00". now when the page reloads (via ajax or pagereload) theres a new colum sayin "9h" and the colums start/end are editeble so that a user could change "08:00" to "08:30" or what ever..
00:47 <****> krustofski: Crunchy :]
00:47 <****> so you just always calculate that third value from the two inputs... I don't see what's the big deal... (end - start) = hours worked
00:48 <****> hmm i think its the time of the day thats the problem...
00:48 <****> (tierd)


Total 27 pages. You are browsing page 1/27.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo