« first day (594 days earlier)      last day (4353 days later) » 

Sam
8:00 AM
good for you, buddy :)
 
is that code getting me anywhere?
 
Sam
close....but not yet
 
ooh im close eh
aight
 
Sam
always use double quotes for sql statements
not a rule, but a guide
since you might need single quotes for specific characters within the statement
 
morning
 
Sam
8:03 AM
morning, Rep
 
Double quotes has some AI, unlike the single quotes.
 
Sam
hey, Shyam; didn't see you sneak in.....:P
how you doing, buddy?
 
@Sam lol
came in early
finished pending work. :) So I'm free now..:)
 
Sam
nice
 
You can type variables directly into double quotes, but not in the single quotes :)
 
Sam
8:04 AM
free as a bird
 
truly
 
Sam
well.....until the next project
:P
 
:(
but too much of flying can lead to flying in circles.. then boredom..
yep.. Until the next project :)
 
Sam
you work on Android platform too, don't you?
 
nope.. Android is just something I am trying to learn..
 
8:08 AM
lol how about this pastebin.com/sgrgTqG8
 
Knowledge is key.. knowledge is power.. something on those lines :)
@BillChen Blocked to me.
 
Access to this site has been blocked as per Court Orders
 
@BillChen thats what was shown.. India has a lot of these things coming up..
at some point sites like mediafire were also blcked
*blocked
 
8:10 AM
oh
 
@BillChen still blocked :(
 
india blocks pastebin>
 
govt agenda I guess
 
Sam
@BillChen when you ran that code, did it work?
 
8:11 AM
@Sam I'm off for the night, don't stay up too late
 
@BillChen you should really disable the emulating of prepared statements
 
Sam
alright @Nick; have fun
 
lol haha I will
 
Sam
will be off soon, myself
 
sorry wat do u mean by that Repwhoringpee..ha... erm lol nice name
 
8:12 AM
damn.. I still haven't come arounf to learning mysqli or pdo..
 
@BillChen start by reading this: pieterhordijk.com/tutorials/sql-and-php-done-the-correct-way-tm (work in progress)
 
Sam
@ShyamK you are missing a lot.....and then, some
:P
weren't you banned from programming until you learned mysqli/PDO ? :P
 
hehe.. kinda.. self ban.. :) Thing is the sites that I work on don't require me to do much db change via code.. and they all use mysql.. so there is no pressing need in the view of my work at present
:(
 
@ShyamK are you saying you don't need to use mysqli or PDO because you are using mysql?
 
@RepWhoringPeeHaa not really.. I'm saying that sites that I work on do that and hence don't present the need to learn them.. but I will learn them.. the weekend is here :)
When those sites crash due to the old mysql_* I'll come to the rescue :)
buhaha
:)
 
Sam
8:23 AM
lol.....not if they blame you first for the mishap....:P
 
haha.. Pre-existing site.. I wasn't the one who wrote the mysql_* queries..
Some other dude b4 me :)
haha
 
Sam
lol.....well, managers usually tend to blame the current developers.....hopefully, not yours
 
hmm.. hopefully
got a query.. a site stopped working.. like totally.. its down.. Don't know why.. It was working the last time I checked and I am the only one editing it.. But the original site ie the one to which this downed site points is still up and running perfectly.. Any particular reason why?
Understood?
 
Sam
what do you mean by original site ie the one to which this downed site points
 
did this do anything?
 
8:32 AM
site 1 points to site 2.. site 2 is fine.. site 1 is down..
two urls single bunch of code..
get it?
 
Sam
so, check the forwarding configuration.....I think
 
just asking if its a problem with the code or not
the admins here did the "pointing" thing.. so its their fault right?
 
@BillChen why do you have html in your database?
 
html?
 
Sam
if all site 1 does is point to site 2, then, any code change should only affect site 2, right?
 
8:35 AM
where?
 
@BillChen you do <select name="namelist">$memberlist</select>
 
Sam
@BillChen that's still not correct; read that article first before trying out the examples
 
1) memberlist is an array
2) it lookt like it contains html
 
nope it will affect both as the are actually one and the same.. just two urls
like a name and a nick name
:)
both point to the same person
;)
 
Sam
do sites 1 and 2 reference the same files? in the same location?
 
8:36 AM
yes
could it be that the url is not registered or expired or something?
brb... its lunch time here and I gotta have my food.. :)
 
Sam
maybe you changed some settings in the code that conflicts with site 1
 
$stmt = $pdo->prepare('Select teamname from members');

while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
echo "<option>$row</option>";
}
 
Sam
9:03 AM
time for the bird to roost; goodnight, y'all
 
later @Sam
 
thanks for your help sam
 
hmm.. settings? seriously I have no idea about any settings
 
OK!
IM FINALLY GOING SOMEWHERE
$stmt = $pdo->prepare('Select MemberID from members');
$stmt->execute();
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
echo "<option>{$row[':teamname']}</option>";
}
?>
this code
doesnt give me the names of the entries in the column
but it gives me 6 options
which is the exact amount in my database
 
9:36 AM
any one is there
 
you mean?is anyone here
 
im here
 
oh yes sorry
is sleep() destroy variables in php?
i have to store some data in database but when i use
$var1 = rand(16,31);
sleep($var1);

than its not store the data in database
??
@Webtecher ??
 
omgg i hate pdo
its giving me 6 options but with no name!!
anyone able to help? :(
 
@BillChen sorry i didn't whats pdo
 
9:46 AM
erm
basically
i need a drop down list
with values from a column in my database
that column in the table
has 6 entries
<select id="teamlist" name="teamlist">
<?php

$pdo = new PDO('mysql:host=localhost;dbname=clubresults', 'root', '12345678');
#Set Error Mode to ERRMODE_EXCEPTION.
$pdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);



$stmt = $pdo->prepare('Select MemberID from members');
$stmt->execute();

while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {

echo "<option>".$row['teamname']."</option>";
}
?>
</select>
when i run that code i get a drop down list
with 6 options so its working
BUT
the drop down list 6 options has no name
NO WAIT A SECOND
OMG I GOT IT WAT THE CRAP
THANKS SO MUCH @ABDULLAH
 
hey erm
('Select MemberID, teamname from members where .....')
is it possible to link memberID and teamname together?
For example
column1 = MemberID
Column2 = Teamname
MemberID = 1, Teamname = gg.net
is it possible to erm autofill memberID = 1 if I choose gg.net?
 
10:29 AM
@BillChen What do you mean by autofill ?
 
mornings
 
Morning
 
gm :)
 
looks like nothing important was missed
 
good morning~
erm anyone here?
can anyone help me with one last question about php and mysql?
@Malgin nevermind about that question :P
 
10:42 AM
hi
 
yay
 
can i edit images with php
 
erm
erm i dont know lol
 
@BillChen k
 
@techno i think yes but how i dont known ;)
 
10:43 AM
Hey Malgin
can u help me with 1 more question? :P
 
I'll try)
 
okay! :D
ok basically this is what ive done
ive made a dropdownlist
linked to my database column
so it shows the entries in one of the columns
dam this is pretty hard to explain
basically
i have a text box
for teamname
lets say erm the textbox says "diablo"
when i submit that text box
i want it to er also fill in the MemberID for me
in my database there is already a teamname called diablo
with memberID of 2
what kind of select statement is this
wow this is such a crap explanation of my problem
 
can we not add data in mysql with sleep?
 
@BillChen I think I see what you are trying to do....
I see two ways to accomplish this
 
is it possible to do this?
Select MemberID from members where teamname = "that teamnametextbox"
 
10:48 AM
@tereško morning
 
have anyone tried any watermarking softwares
 
first - when you form your html page before sending it to client - form additional JS object which holds all Members IDs and their names. Then, when user types a name, you check if you have such a teamname in your object, and if there is one, you fill in the filed (with js). The simpier implementation of this is just form a dropdown of teamnames with ids as values
 
@techno i think this will help you
http://php.net/manual/en/image.examples-watermark.php
 
YESS
 
@BillChen second way is ajax request each time user types new letter in the textbox
 
10:50 AM
thats right
YESSS
but the data
is in the table
i cant manually type in every persons ID
into my form
coz right now my droplist 1
 
you could do this programmatically
 
is grabbing data off my table column 2
 
Have anyone used a Desktop Batch Watermarking software
 
so
how do i do it?
 
SELECT teamname, member_id FROM teams WHERE 1
 
10:52 AM
where 1?
 
you will get the list of all members with their IDs
 
would i be able to get the list
 
i am trying to insert data in mysql inside foreach with sleep(20)
normally its inserted but with sleep(20) its not
any solution ??
 
would i be able to er
when i choose this entry in my drop down list
it automatically chooses the ID
and enters the ID along with the form
 
@maglin ???
 
10:54 AM
This depends on how you form you html for the form on server side. Show me the form. All the html.
 
okay
post here?
 
@DanishIqbal why do you use sleep (20) ?
 
or in pastebin?
 
@BillChen pastebin
@DanishIqbal why ?
 
10:55 AM
sorry my code is pretty messy
 
i think 10 till 12 GMT is the scariest time in this chat room
 
@BillChen np
 
but your're an expert im sure ull figure out what im actually doing :P
 
@tereško any suggestion why ? :)
 
10:56 AM
@tereško You have missed most of the terror
 
@Malgin to avoid spam filters
 
coz basically im er adding an entry into 2 tables: results and events
adding entries to events is no problem
but the result talble doesnt work
because I didn't specify the memberID
 
@RepWhoringPeeHaa , yeah , they have been at this for hours
 
if i dont specify memberID and EventID it wont add anything into the table
lol this assignment is due on 11:59:59pm
now is 9:00pm
 
@BillChen do I understand properly: you want to specify member ID in
<input name="teamlistid" id="teamlistid" type="hidden">
to pass it to the server ?
 
10:59 AM
ive got 3 hrs left LOL
yesss
 
i am trying to insert data in mysql inside foreach with sleep(20)
normally its inserted but with sleep(20) its not
any solution ??
 
like when i choose a entry in the dropdownlist
it automatically enters the memberID
into a hidden text box and submits it
 
@DanishIqbal commonly, script works only for 30 secs, and then terminates. sleep(20) mean that it will just wait 20 sec and not doing anything. I guess that you managed to insert only one row in the DB (assuming you don't use transactions)
@BillChen you don't need this
 
oh?
 
@tereško and it goes on and on and on
 
11:01 AM
@BillChen Actually, this is basics of form design. Here's a solution
 
@BillChen as i understand can you do this like
when you choose entry in the drop down list set some thing on lost focus to select memberId from the table and than set if found the id than submit is it ok ?
maybe i am wrong because i'm newb
 
so.. which part do i remove and paste your new code?
 
then, on server side, you will get $_POST['teamlist'] variable with team ID
try and find it yourself
 
11:04 AM
okay
got iot
the select team list place
 
@Malgin so is there any solution for this
did set_time_limit() works ?
 
oh no
my dropdownlist
team names all gone
 
@DanishIqbal yes, but his is AWEFULL. Entering 10 entries will take more than 3 min. Any user will go away from your site during this time
@BillChen you should replace member_id with real field name in your table
I was guessing
 
OH LOL I DIDNT REALISE
yeah i just saw that
oh wow
Malgin
 
11:07 AM
@Malgin i will currently do this in my computer than after cron job start this on web hosting server
 
you are an absolute LEGEND love you so much
 
@BillChen you are welcome
 
hm dam it still isnt adding into results :(
al error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES (NULL, 'abvvv', NULL)' at line 2' in
C:\xampp\htdocs\clubresults\adminrecordevents.php:193 Stack trace: #0 C:\xampp\htdocs\clubresults\adminrecordevents.php(193): PDOStatement->execute() #1 {main} thrown in C:\xampp\htdocs\clubresults\adminrecordevents.php on line 193
 
show the code where you are adding entries to DB
 
so its not adding entries into memberID and teamname
$stmt=$pdo->prepare('INSERT INTO results (MemberID, EventName, teamname
VALUES (:MemberID, :EventName2, :teamname)');
$stmt->bindValue(':EventName2', $_POST['EventName2']);
$stmt->bindValue(':teamname', $_POST['teamname']);
$stmt->bindValue(':MemberID', $_POST['MemberID']);

$stmt->execute();
 
11:09 AM
you have to fix sql there
member ID is teamlist variable in POST
$_POST['teamlist']
 
@BillChen I see you are new here, please check out Chat FAQ
 
man, you should read manuals
 
$stmt->bindValue(':MemberID', $_POST['teamlist']);
ok its now adding entry to memberID
but teamname is still null
hm
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES ('20', 'ssssss')' at line 2' in
C:\xampp\htdocs\clubresults\adminrecordevents.php:193 Stack trace: #0 C:\xampp\htdocs\clubresults\adminrecordevents.php(193): PDOStatement->execute() #1 {main} thrown in C:\xampp\htdocs\clubresults\adminrecordevents.php on line 193
 
You already have the name, if you have ID. Just select from DB
 
@Malgin i use this set_time_limit(1000); but again get only one entry in database
 
11:16 AM
this is because your script still runs 30 secs. Search that way
 
so what can i do for this
 
its adding into Events table
but not adding anything to results
oh shit i get why
EventID
 
Anyone knows how to move HTML table field to right?
 
@Donut style="text-align:right" on the <td> will align its contents to the right
 
I need something like: pastebin.com/PG6FAHJx
 
11:27 AM
@Donut you can use rowspan="2" on the <td> for that
 
I need to set right field to specified size and left should take rest of size.
float:right is not working.
Damn tables :(
 
there is a thing called rowspan? I thought only colspan existed.. How naive am I?
 
Oh, those tables, forgot to set <table width="100%">
 
how to center two pics in a line? I have currently set style="float:center;" in the <img> tags., but it seems that FireFox doesn't support this
Chrome does the centering fine.. But not FireFox..
 
display: block; margin: 0 auto;
On <img>
 
11:39 AM
For me?
 
Yes
 
Hey friends !
who has knowledge in joomla?
 
that will center vertically won't it?
 
posted on June 01, 2012 by Pádraic Brady

A fig tree (Photo credit: Giorgos~ (moving to Google+)) Recently, Anthony Ferrara posted “Open Standards – The Better Way“, a blog post questioning the operation of the PHP Framework Interoperability Group (FIG). The FIG is a body representative of PHP “frameworks” (with a broad definition since it includes phpBB, Drupal and even more divergent members) which issues PSR standards

 
11:42 AM
To center them horizontally, give both images display:inline; and give their parent element text-align:center; or margin-left:auto;margin-right:auto; if it has a width.
you probably don't even need the display:inline unless the browser defaults it to block or some other CSS sets it
 
12:00 PM
@Feeds , what a sad joke
 
who is joomla master?
 
@tereško lol
 
hey, is there a php function to check if input string is member of number interval ( for example 1-3)?
 
you act like i did something wrong .. or something
@BikerJohn , thats a bit vague .. makes me thing you need ord()
 
12:10 PM
Ill give an example. -> file.php?message=1. The only values that are acceptable are 1,2 and 3. I would like to make a filter if user inputs anything else that these three numbers.
So i am wondering if there is a faster way (checking if input is member of number interval) instead of checking every single number. (if ($message==1 OR $message==2....))
 
hi
 
$foo = (int)$_GET['message'];
if ( in_array( $foo, array(1,2,3) ) )
{
    // its OK
}
 
@tereško aha okay, ill try this way. Thanks :)
 
@BikerJohn If your range gets too big to write literally, substitute array(1,2,3) for range(1, 3)
 
Hey @tereško do help me to solve my joomla issue
 
12:17 PM
no
 
@Bracketworks yes, range, thats the thing i was looking for :) Thank you both
 
why ? u have a no knowledge? @tereško
 
@BikerJohn However, if the range is continuous and large, then you're better to check using if(1 <= $foo && $foo <= 29387)
 
no , i have a rule not to work with shit, right after taking a shower
 
As otherwise PHP has to iterate the values 1 through 29387 in the array. Much more costly.
I would recommend that approach anyway, but I'm just running with the example given.
 
12:20 PM
the example was give , since he never said if set of numbers was continuous or not
 
While it's an informal rule, I'm starting to think some level of enforcement is necessary on the "Don't effing ping anyone if you waltz in here with a question and nothing more"
 
how about regex matching?
 
@Bracketworks i automatically ignore
 
@Bracketworks Yes i understand. No, these numbers are just array keys for messages array. (for example 1-3 = three messages in array) And i just wanted to make sure, user doesnt enter a value that does not exist in the messages array. Its automated though, but user could always change the url.
 
look who's awake
mornin'
 
12:24 PM
function numeric($str)
{
return ( ! ereg("^[0-9\.]+$", $str)) ? FALSE : TRUE;
}
 
evenin' :P
what's ereg ?
:O!
 
@BikerJohn , in that case i would work with array_key_exists() function
@manix , that's deprecated since 5.3
 
@manix from php.net: This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.
keyword, highly ;]
 
Tar
?? is_numeric() ??
 
?? cookies ??
 
Tar
12:26 PM
wats cookies
 
?? rhubarb pie ?? gonna go for a piece
 
another random word surrounded by question marks
 
@tereško yes, good idea, thanks :)
 
well, I am so novice... Thank you for clarification
 
@manix , wouldn't that imply that you know only the latest php ?
 
12:28 PM
@manix try preg_match, it's the alternative
unless he's on some useless tutorial website using dinosaur code
 
@tereško Not true, he could be learning on a P1 via 56K, reading articles he searched up on Alta Vista
 
@NikiC i really like that idea ^^
 
@Bracketworks , hardware should not matter .. and IMHO, you should be learning programming on such a device. It provides clear feedback when your code is slower then it should be
 
@tereško several times when you read a tutorial you are not sure waht version of php was used
 
@tereško True, but perhaps he's just sticking with a theme.
 
12:31 PM
@CarrieKendall ok I will :)
 
@manix , if it mentions w3schools , then its the wrong place
 
Oh, the days when for(...) == sleep(...)
 
oh! w3schools?? I have taken notes from this site :S
 
Greetings
 
12:44 PM
Hi all
 
hello
 
well, I need to leave
nice to meet you you all
 
why this rewriting doesnt work in wamp ?
<IfModule mod_rewrite.c>

Options +FollowSymlinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?url=$1 [PT,L]

# Redirection sauf pour ces fichiers
# RewriteRule ^(?!(?:robots\.txt|sitemap\.xml|opensearch\.xml|humans\.txt|crossdomain\.xml)$)(.+)$ $1

</IfModule>
it work at my home
 
@MikeBoutin is this in a .htaccess or in httpd.conf?
 
@Zundrium in htaccess
 
12:54 PM
@MikeBoutin No need for the ifModule then. Just use this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php
Missing a { at %REQUEST_FILENAME} !-d
 

« first day (594 days earlier)      last day (4353 days later) »