@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27



Comments:

<0> schmalls: it wasa?
<0> i just did a time php -r '$a = 1; $b = 2; $c = $a . $b;'
<1> sean_micken: well at least I thought so
<1> sean_micken: is that on linux
<2> TML, sean_micken thanksy for your help today
<0> schmalls: os x
<1> I don't think windows has time
<0> doubt it
<0> prolly can go download an equivalent though.
<1> it displayed the current time and then asked for a new time to be entered
<1> sean_micken: or I could just ask on here
<3> is my $query_cart = mysql_query('SELECT * FROM cart WHERE customerID = \'' . $customer['customerID'] . '\' ORDER BY dateAdded DESC'); correct? there are more than 1 row of data from each customer
<1> Elekchron: what does $customer have in it?
<4> Anyone know how i would scan through every folder within a directory and return each of their names?
<0> Jaywalker: opendir() and readdir(), php.net/opendir
<4> Thanks



<0> Jaywalker: you'll need a recursive function if you want to scan recursively.
<3> schmalls $customer has customerID username
<3> and user info
<1> Elekchron: and is customerID a unique id?
<3> yes
<4> sean_micken: how do you mean?
<5> anyone know how to find a match between tags? <p> and </p> or whatever?
<1> Elekchron: then I don't think it should return multiple rows, but cart sounds like it has items that are in someone's cart
<1> Elekchron: that sounds like several items could have the same customerID so that you could show what all items they had selected
<0> Jaywalker: look at php.net/dir -- read the user comments, second one down has a recursive function
<1> is that the case?
<6> hi, anyone know what's wrong w/ this port_scanner: http://pastebin.com/730555
<6> http://pastebin.com/730562 these are the errors i'm getting when I run the portscanner
<5> ah nevermind, i think i've got it
<4> Ok
<3> in table cart and table order history, customerID isn't unique
<7> Where would I go to discuss js?
<3> in table customer, the customerID is unique
<1> Wsoprulz1299: well you aren't sending any arguments to scan() on line 42
<3> my bad for not explaining
<1> Elekchron: but in cart can several rows have the same customerID
<3> yes
<3> and customerID is not unique
<3> in cart
<3> sorry i thought u were talking about my customer table
<1> so it should be possible to get several rows returned then
<8> kai_wp, #javascript
<3> yes but
<3> it doesn't add or delete
<6> ugh, im confused :/
<1> Wsoprulz1299: what are you doing with this anyway
<7> Thanks raidman|Work! :D
<1> Elekchron: what do you mean
<6> just practicing socket programming?
<1> Wsoprulz1299: why is that in the form of a question
<3> schmalls, $add and $delete doesn't work
<3> in http://pastebin.com/730488
<6> ok: just practicinf socket programming
<6> practicing*
<1> Wsoprulz1299: ok whatever, the scan function on line 34 defines 3 arguments
<6> yea
<3> schmalls: http://pastebin.com/730488
<1> Wsoprulz1299: and it also doesn't seem to even need scan() at all on line 42
<1> Elekchron: does it give any errors?
<6> ok, if I remove it from line 42, I get : Warning: socket_select() [function.socket-select]: no resource arrays were p***ed to select in /usr/local/www/apache22/data/scripts/Port_Scanner.php on line 72
<3> schmalls: no errors.
<1> Elekchron: ah I see, you have the error checking set up to display an error if the INSERT didn't work, but to DELETE if it did, either way it looks like nothing happened
<1> Elekchron: oh never mind
<1> Elekchron: have you tried echo'ing something in the while loop to make sure it made it that far
<1> Wsoprulz1299: try changing line 69 from $done to $mouse[]
<3> schmalls. please wait
<1> Wsoprulz1299: and maybe change lines 59-60 to return $socket
<6> so that it is $mouse[] = whatever
<6> Warning: socket_select(): supplied argument is not a valid Socket resource in /usr/local/www/apache22/data/scripts/Port_Scanner.php on line 72
<6> i get that over and over
<3> schmalls, no it doesn't work when i echo inside the while loop
<3> do u know what's wrong with the loop?
<6> ill try to change it to return $socket
<6> i changed itand I get:
<6> Warning: socket_select(): 2 is not a valid Socket resource in /usr/local/www/apache22/data/scripts/Port_Scanner.php on line 72
<6> Warning: socket_select(): 3 is not a valid Socket resource in /usr/local/www/apache22/data/scripts/Port_Scanner.php on line 72



<6> etc, with the number increasing
<9> do you know something like PHP Live (support chat in ajax) for free?
<1> Elekchron: try seeing what mysql_error() does before the loop
<1> Wsoprulz1299: could you post the update code
<1> *updated
<3> i did, no error shows :(
<1> Elekchron: are you sure the query is returning anything, maybe you could echo both the customer and cart queries
<3> hold on let me try
<3> hm it doesn't even print those variables inside the loop
<3> i don't get it
<1> no I mean the exact queries you are sending to mysql_query
<1> it is not getting to the loop because there are no results for the second query
<3> this one? $query_cart = mysql_query('SELECT * FROM cart WHERE customerID = \'' . $customer['customerID'] . '\' ORDER BY dateAdded DESC') or die(mysql_error());;
<1> yes that one and probably the one before it, and maybe even a print_r($customer)
<3> print_r($customer) inside while loop?
<3> let me try
<1> no outside of the loop
<1> the problem is it never goes into the loop
<3> nope nothing for print_r($customer)
<10> can you do strategy patterns in php?
<6> schmalls: http://pastebin.com/730584
<3> wait no, i get something
<3> Array ( [0] => 20 [customerID] => 20 [1] => Elekchron [username] => Elekchron [2] => Eric [firstname] => Eric [3] => Hu [lastname] => Hu [4] => jenishot [p***word] => jenishot [5] => elekchron@jameshu.com [email] => elekchron@jameshu.com [6] => Monterey Park [city] => Monterey Park [7] => 680 Barnum Way [street] => 680 Barnum Way [8] => 1 [country] => 1 [9] => 4 [state] => 4 [10] => 91754 [zip] => 91754 [11] => 2006-05-13 15:13:51 [j
<1> ok so are there rows in the cart table with `customerID` equal to 20?
<3> not in cart table, in customer talbe
<1> Wsoprulz1299: remove line 28
<3> $customer = mysql_fetch_array(mysql_query("SELECT * FROM customer WHERE username = '$member'"));
<6> k
<1> Elekchron: but the second query is searching `cart` for rows with customerID equal to 20
<3> let me do print_r($cart)
<3> nothing
<3> im confused now
<1> right because $cart is never defined because the second query doesn't seem to be getting any results
<6> schmalls: I got this in return
<6> Port is open
<6> Warning: fclose(): supplied argument is not a valid stream resource in /usr/local/www/apache22/data/scripts/Port_Scanner.php on line 74
<6> 256
<6> i only ran it from port 79 to 81, and I know that port 80 is open on my computer, so that's what it *should* have returned
<11> Wsoprulz1299, I don't know what it is, but the stream you opened to look for the port closed itself or didn't open. try an @ before the fclose and see if it works.
<3> yeah, i guess
<3> but i don't know what's wrong
<3> :(
<1> Wsoprulz1299: actually you are trying to close an integer not a stream, hince the error
<1> Elekchron: what does the cart table have in it
<1> like actual rows that are present
<6> should I remove the fclose command?
<1> Wsoprulz1299: I think so
<6> ok
<6> ok all I get is this now...
<6> Port is open
<6> 256
<6> it should read: Port 80 is open
<3> customerID
<3> productID
<12> any know how I can get PHP to not quote my ' in form inputs?
<3> quantity
<3> dateAdded
<6> schmalls: here is updated code
<1> Elekchron: is there any data in it?
<3> yes
<3> there is
<6> http://pastebin.com/730590
<1> how many rows have customerID equal to 20
<3> 1 row so far
<3> wait let me see
<13> is there a var_dump() or print_r()-like function that would only print public properties/methods?
<3> okay 2 rows
<12> ugh google just informed me of "magic quotes"
<1> Elekchron: after line one could you put: echo 'SELECT * FROM cart WHERE customerID = \'' . $customer['customerID'] . '\' ORDER BY dateAdded DESC'; and then run that exact query on your database and see if it returns anything
<3> let me try
<3> echo it?
<1> yeah just to see what query is being sent to mysql_query
<3> id id echo
<3> it just printed out the words


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

ipw2000bg
#math
qt-mt not found emerge
#ubuntu
suse 10 remote desktop connection
gaim amarok
qemu scsi emulation
fc4 atrpms ivtv kmdl rebuild
#oe
autogreet xchat



Home  |  disclaimer  |  contact  |  submit quotes