IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.48 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-05-25
Pages: < Prev
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
28
29
30
31
32
33
Next >
[15:43]<fuznnz>Qube, to type <img src='<?php DOC_ROOT_CONST.'/image.jpg'; ?>'> .. nooo...
[15:43]<qu2n>jmut, yeah I do (in a way), I set $filerel and $hrefrel at the top of the script
[15:44]<qu2n>$hrefrel is usually just '/' and $filerel is docroot
[15:44]<rrvvd_>lugzer: you'd need an echo
[15:44]<dyvxzj>anyone got pointers for me?
[15:44]<fuznnz>Ratty_, obviously, i forgot to add it
[15:44]<aduv>mithro: you are asking how to create class? pls clarify.10x
[15:44]<qu2n>lugzer, then, sir, you are just being lazy
[15:45]<fuznnz>Qube, no ;) just trying to find a golden solution
[15:45]<qu2n>lugzer, we gave several here... they all involve slightly more typing, you doin't want to type.
[15:45]<dyvxzj>In a C Extension I would like to create a new php class
[15:46]<fuznnz>Qube, actually i think i've got it, Savant has image plugin.. ;)
[15:46]<aduv>lugzer: golden solution would be to have registry including config object or something with important paths(full) in it...and use them wherever you like
[15:46]<aduv>mithro: :) how are we supposed to know it is C issue :). Sorry I cannot help
[15:47]<dz-lyguw>Qube: php is big language or perl?
[15:48]<yvzn2rf>mithro: you can create classes inside C which PHP will be able to use, i'd start by reading through the Tidy and SimpleXML extensions, seeing what they do (but prepare for a lot of headaches)
[15:48]<dyvxzj>okay
[15:55]<qu2n>Dr-Linux, both are well established. imo php is better for web and "user application" type jobs... perl is better for parsing/scripting/integrations between disparate systems
[16:00]<kyrrdyfj>hey guys :) - I want to put a date into mysql, i manage to get the date and echo it too my website, then i try to pick it up as a variable from the form, and put it into mysql, but no luck, here is the code: <? $date = date("Y-m-d"); ANY ideas? :)
[16:01]<vjgd_>hi how can i prevent from multiple data being entered into mysql database? i dont know how does it happen. it just happens sometimes that there are 4-5 duplicates for some records.
[16:02]<vjgd_>sorry not multiple data --> duplicate data
[16:02]<wrel>tony_: add unique fields
[16:02]<2gdsjg>hey folks - I can code php, but I have NO idea how to install it on my mac (running php4)... how do I install php5 on my mac?
[16:03]<2gdsjg>yes, I've used entropy - but it only installs for my user account, not globally, nor does it effect the php available in my terminal (I do have terminal php scripts)
[16:03]<vjgd_>wazp, will it make anyother problems? using php to eliminate duplication is better or using unique is better?
[16:03]<byre>bemson: Go and read http://php.net/install
[16:03]<2gdsjg>will do
[16:03]<2gdsjg>grtazi
[16:03]<cyjvj>hei BigE
[16:04]<byre>hi
[16:04]<cyjvj>:)
[16:04]<wrel>tony_: just make unique index by few important fields. the second time the entry will not be placed in the db
[16:04]<_ymrg>how can i check if a link is broken or not? and without use of CURL or sockets?
[16:05]<kyrrdyfj>hey guys :) - I want to put a date into mysql, i manage to get the date and echo it too my website, then i try to pick it up as a variable from the form, and put it into mysql, but no luck, here is the code: <? $date = date("Y-m-d"); ANY ideas? :)
[16:05]<grvxn>is there a decent development framework (portal style) out there for php?
[16:06]<wrel>Kingmilo: use mysql functions :)
[16:06]<vjgd_>wazp, thank you . but when i try to enter the same data again, will it give me an error msg and stop or do something else to screw up another record?
[16:06]<kyrrdyfj>wazp, $request = "INSERT INTO `deferments` ( `defid` , `cusid` , `defdate` , `fileno` , `duty` , `sch12b` , `vat` , `amount`) VALUES ('', '$cusid' , '$date' , '$fileno' , '$duty' , '$sch12b' , '$vat' , '$amount');";
[16:06]<grvxn>something with true user/group management, that would work in a buisness style enviornment
[16:07]<kyrrdyfj>but i dont think im generating a variable php side?
[16:07]<wrel>tony_: i think it will return you error message ... at least with pear you could check with if (DB::isError($res))
[16:07]<grvxn>i'm looking to not recode the wheel
[16:08]<wrel>Kingmilo: if you insert current date, why don't you just insert NOW() in mysql
[16:08]<wrel>it's the same
[16:08]<kyrrdyfj>wazp, yes i cud try that ty ;)
[16:08]<kyrrdyfj>thanks
[16:08]<cyjvj>use an integer and insert with time()
[16:08]<vjgd_>wazp, ok. i know the error is caused by the user pressing the submit button a few times. because sometimes the page takes a little while to refresh. i already have a check in place to prevent duplicate entries in my program. but surprisingly this doesnt work when the user presses the submit button a few times countinuously.
[16:08]<cyjvj>and later you can format with date(), to reduce dependence from mysql
[16:09]<cyjvj>tony_ try to use the session to avoid double insert
[16:09]<wrel>tony_: using unique will prevent errors
[16:09]<cyjvj>yes too
[16:09]<wrel>kioto: won't help in all cases ...
[16:09]<wrel>especially when double clicking
[16:10]<vjgd_>wazp, ok thank you. i will use unique then.
[16:10]<vjgd_>thanks kioto
[16:10]<cyjvj>np
[16:11]<vjgd_>wazp, my current table has no unique fields except the ID. so if i change the field into a unique field, will I loose any data?
[16:11]<wrel>i suggest you to use several unique fields in one unique key
[16:12]<wrel>if there is already duplicate data, you won't be able to create the unique key
[16:12]<yvzn2rf>oh shit..
[16:13]<vjgd_>wazp, sorry i do not understand what you said. in my table i have columns and raws and i can change a column to unique. is that i need to do? what do you mean by several unique fields in one unique key?
[16:13]<wrel>several columns should be united in one unique key
[16:13]<wrel>you choose which... like firstname, lastname, some_specific_data
[16:14]<vjgd_>wazp, ok then?
[16:14]<wrel>you create one unique-type key with the columns you want
[16:14]<wrel>that's all
[16:14]<yvzn2rf>gah!!! why doe sit keep anouncing it :/
[16:14]<wrel>there's no 'then' :)
[16:15]<vjgd_>wazp, thank you :) let me try.
[16:15]<wrel>tony_: np
[16:17]<tml>caffinated: You around?
[16:18]<vjgd_>wazp, is it unique-index type key?
[16:19]<wrel>yes
[16:19]<dsv>harrrr
[16:22]<vjgd_>wazp, ok that works now. thank you.
[16:22]<wrel>np
[16:23]<tml>!tell wazp about g7
[16:23]<yvzn2rf>but TML can :)
[16:23]<vjgd_>wazp, is there any command that i can use in mysql or php to list only the duplicate data?
[16:23]<wrel>TML: i don't have bots don't spam ... what is this all about
[16:24]<tml>wazp: "or onjoin/away/back messages"
[16:24]<wrel>neither these
[16:24]<wrel>i wrote /me is away
[16:24]<wrel>that was to tony_ :)
[16:24]<tml>That's an away message, wazp
[16:24]<wrel>it's not ... i wrote it :)
[16:24]<wrel>anyway
[16:24]<tml>Then send it in private
[16:24]<wrel>ok, as you wish
[16:25]<vjgd_>wazp, sorry i just got disconnected, i didnt get your message.
[16:25]<sjdg`jgg>Hello, someone could tell me how to remove a value from an array?
[16:25]<sjdg`jgg>Thanks
[16:26]<rrvvd_>unset()
[16:27]<yvzn2rf>array_pop sometimes
[16:27]<rrvvd_>array_pop, and array_shift() are best if you want to remove stuff from the end or beginning of the array
[16:27]<rrvvd_>*pop*
[16:29]<sjdg`jgg>ok thanks
[16:29]<qu2n>some`one, damn...
[16:29]<qu2n>eedjit asked simultaneously on freenode and efnet







