php-general Digest 5 Mar 2006 15:06:46 -0000 Issue 3999

Topics (messages 231460 through 231474):

[JOB] LAMP Developer, Washington, D.C. | 80k
        231460 by: Beau Gould

[JOB] LAMP Developers, Los Angeles | 70-120k
        231461 by: Beau Gould

Re: Prepared statements
        231462 by: Julius Hacker
        231463 by: Anthony Ettinger
        231464 by: Julius Hacker
        231467 by: chris smith

¡¶¸ß¶û·ò³¤´ò¾øÕС·¡¶¸ß¶û·òʵսÐÄ·¨¡·
        231465 by: znbju6

Re: php/mysql/phpMyAdmin on an iBook?
        231466 by: chris smith

help with this error message please
        231468 by: Mark
        231469 by: Mark
        231470 by: chris smith

Re: Mysql Rows
        231471 by: tedd
        231472 by: chris smith

Re: output Today's date
        231473 by: tedd

Contact List Grabber
        231474 by: Ahmed Abdel-Aliem

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
LAMP Developer, Washington, D.C. | 80k

Candidate must have solid skills and experience in developing robust web 
applications, using object oriented programming languages and techniques, and 
possess database design and optimization skills. You will interact with 
clients, co-workers and managers. Strong ability to partner and work in a 
fast-paced, collaborative team environment is a must. This is a web programming 
position, not a web design position.

Requirements (please have a majority of these skills): 
* 2+ years of experience in PHP development 
* 2+ years experience in MySQL, Oracle, PostgreSQL, Stored Procedures, database 
management and scripting/development 
* Object Oriented Programming concepts and application experience 
* XML, XSL, XSLT, XSL:FO 
* SQL 
* JavaScript 
* CSS 
* HTML 
* Familiarity with Linux and/or the UNIX command line 
* Experience dealing with Apache as a web server 
* Able to trouble shoot other developers' code 

To be considered for this position, candidates:

MUST live in the tri-state (D.C., VA, MD) area. 
MUST work on-site at clients Washington, D.C location. 
MUST be a US Citizen or GC holder 

If you are interested in this position and live in the DC, VA or MD area, 
please submit resume, a paragraph or cover letter highlighting your experience 
as it pertains to this job and your salary requirements to [EMAIL PROTECTED]


Linux Jobs: http://groups.yahoo.com/group/linuxjobz 
Ruby/Rails Jobs: http://groups.yahoo.com/group/rubyrailsjobs 
Python/Zope Jobs: http://groups.yahoo.com/group/pythonzopejobs 
Open Source Jobs: http://groups.yahoo.com/group/opensourcejobs 
LAMP Jobs: http://groups.yahoo.com/group/LAMPjobs 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.2/274 - Release Date: 3/3/2006
 

--- End Message ---
--- Begin Message ---
LAMP Developers, Los Angeles | 70-120k 

LAMP Developers needed at all skill levels for multiple Los Angeles clients for 
full time, on-site jobs ranging from 70-120k + full benefits. 

Candidates must be authorized to work in the United States and be local to the 
Los Angeles, CA area. 

* At least 2 years of professional PHP web development experience 
* Good to expert knowledge of PHP, including knowledge of OO programming a plus 
* Strong experience with MySQL/SQL and creating database schemas. 
* Experience with HTML, CSS and JavaScript. 
* Knowledge of Unix/Linux. 
* Knowledge of Apache web server. 

Please send resume and full time salary requirements to [EMAIL PROTECTED] 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.2/274 - Release Date: 3/3/2006
 

--- End Message ---
--- Begin Message ---
One other thing:
If I do the bind_param within the loop, it just works.

The curious is that I have to prepared statements for this loop (one for
inserting data and one for updating data) and the one for updating data
works and that for inserting don't.
Both statements are 100% valid.

Julius Hacker wrote:
> Hi,
>
> so I need help again:
> I want to use prepared statements to insert lots of data in my
> MySQL-database.
> For that I use foreach because I have an array containing all necessary
> information.
>
> Before that foreach, I use mysqli_stmt_init, mysql_stmt_prepare and
> mysql_stmt_bind_param.
> In the foreach-loop I give the variables, which I bound with bind_param,
> their values and want to execute the statement.
>
> But now MySQL returns always an error.
> It seems that the values I gave the variables in the loop aren't used
> because I used bind_param before that.
>
> In the example for mysql_bind_param they do it like me.
> Is the example also wrong or do I have to consider something special?
>
> --
> Regards
> Julius Hacker
>
> http://www.julius-hacker.de
> [EMAIL PROTECTED]
>
> OpenPGP-Key-ID: 0x4B4A486E
>
>   

--- End Message ---
--- Begin Message ---
On 3/4/06, Julius Hacker <[EMAIL PROTECTED]> wrote:
> One other thing:
> If I do the bind_param within the loop, it just works.
>
> The curious is that I have to prepared statements for this loop (one for
> inserting data and one for updating data) and the one for updating data
> works and that for inserting don't.
> Both statements are 100% valid.
>
> Julius Hacker wrote:
> > Hi,
> >
> > so I need help again:
> > I want to use prepared statements to insert lots of data in my
> > MySQL-database.
> > For that I use foreach because I have an array containing all necessary
> > information.
> >
> > Before that foreach, I use mysqli_stmt_init, mysql_stmt_prepare and
> > mysql_stmt_bind_param.
> > In the foreach-loop I give the variables, which I bound with bind_param,
> > their values and want to execute the statement.
> >
> > But now MySQL returns always an error.
> > It seems that the values I gave the variables in the loop aren't used
> > because I used bind_param before that.
> >
> > In the example for mysql_bind_param they do it like me.
> > Is the example also wrong or do I have to consider something special?
> >
> > --
> > Regards
> > Julius Hacker
> >
> > http://www.julius-hacker.de
> > [EMAIL PROTECTED]
> >
> > OpenPGP-Key-ID: 0x4B4A486E
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

Can you dump the error string reported back from the mysql database
connection? Could provide some insight as to why your INSERT fails,
and the UPDATE works.

--
Anthony Ettinger
Signature: http://chovy.dyndns.org/hcard.html

--- End Message ---
--- Begin Message ---
Anthony Ettinger wrote:
> On 3/4/06, Julius Hacker <[EMAIL PROTECTED]> wrote:
>   
>> One other thing:
>> If I do the bind_param within the loop, it just works.
>>
>> The curious is that I have to prepared statements for this loop (one for
>> inserting data and one for updating data) and the one for updating data
>> works and that for inserting don't.
>> Both statements are 100% valid.
>>
>> Julius Hacker wrote:
>>     
>>> Hi,
>>>
>>> so I need help again:
>>> I want to use prepared statements to insert lots of data in my
>>> MySQL-database.
>>> For that I use foreach because I have an array containing all necessary
>>> information.
>>>
>>> Before that foreach, I use mysqli_stmt_init, mysql_stmt_prepare and
>>> mysql_stmt_bind_param.
>>> In the foreach-loop I give the variables, which I bound with bind_param,
>>> their values and want to execute the statement.
>>>
>>> But now MySQL returns always an error.
>>> It seems that the values I gave the variables in the loop aren't used
>>> because I used bind_param before that.
>>>
>>> In the example for mysql_bind_param they do it like me.
>>> Is the example also wrong or do I have to consider something special?
>>>
>>> --
>>> Regards
>>> Julius Hacker
>>>
>>> http://www.julius-hacker.de
>>> [EMAIL PROTECTED]
>>>
>>> OpenPGP-Key-ID: 0x4B4A486E
>>>
>>>
>>>       
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>     
>
> Can you dump the error string reported back from the mysql database
> connection? Could provide some insight as to why your INSERT fails,
> and the UPDATE works.
>   
MySQL returns "Column 'auction_house' cannot be null".
Here're some parts of my code:

--- code ---

$update = $this->sql->stmt_init();
$update->prepare("UPDATE auctions SET name=?, auction_house=?, link=?,
prize=?, runtime=?, bids=?, picture=? WHERE link=?");
$update->bind_param("sisdsiss", $auction_parts["name"],
$auction_house["id"], $auction_parts["link"], $auction_parts["prize"],
$auction_parts["runtime"], $auction_parts["bids"],
$auction_parts["picture"], $auction_parts["link"]);
       
$insert = $this->sql->stmt_init();
$insert->prepare("INSERT INTO auctions (auction_house, name, link,
prize, runtime, bids, picture) VALUES (?, ?, ?, ?, ?, ?, ?)");
$insert->bind_param("issdsis", $auction_house["id"],
$auction_parts["name"], $auction_parts["link"], $auction_parts["prize"],
$auction_parts["runtime"], $auction_parts["bids"],
$auction_parts["picture"]);

--- /code ---

after this, there's the loop, in which I do either $update->execute();
or $insert->execute(); - the $update->execute(); runs without problems
but the $insert->execute runs into the described problem.

--
Regards
Julius Hacker
       

--- End Message ---
--- Begin Message ---
> MySQL returns "Column 'auction_house' cannot be null".
> Here're some parts of my code:
>
> --- code ---
>
> $update = $this->sql->stmt_init();
> $update->prepare("UPDATE auctions SET name=?, auction_house=?, link=?,
> prize=?, runtime=?, bids=?, picture=? WHERE link=?");
> $update->bind_param("sisdsiss", $auction_parts["name"],
> $auction_house["id"], $auction_parts["link"], $auction_parts["prize"],
> $auction_parts["runtime"], $auction_parts["bids"],
> $auction_parts["picture"], $auction_parts["link"]);
>
> $insert = $this->sql->stmt_init();
> $insert->prepare("INSERT INTO auctions (auction_house, name, link,
> prize, runtime, bids, picture) VALUES (?, ?, ?, ?, ?, ?, ?)");
> $insert->bind_param("issdsis", $auction_house["id"],
> $auction_parts["name"], $auction_parts["link"], $auction_parts["prize"],
> $auction_parts["runtime"], $auction_parts["bids"],
> $auction_parts["picture"]);
>
> --- /code ---
>
> after this, there's the loop, in which I do either $update->execute();
> or $insert->execute(); - the $update->execute(); runs without problems
> but the $insert->execute runs into the described problem.

So at some point the $auction_parts['id'] is empty.

As you go into the loop, print out the $auction_house["id"], then work
backwards...

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
咨询电话:13661106282
订购邮箱: [EMAIL PROTECTED]
联系人:   李小姐

作品简介:
张建国(迪更斯・张(Dickens Chang)),美籍华人,著名画家,业余高尔夫球手。
张建国先生凭借其多年对高尔夫运动的深刻理解和过硬的英文功底,先后编著了《侯根长打绝招》、《瓦臣短打秘笈》和《无敌高尔夫心法》,自1993年开始,陆续在台湾出版(繁体版)。问世之后,读者的反应极为热烈,历十余年而不衰。经过作者重新审定,现代球王“老虎”的绝技也被纳入其中,于是一套最新的全新完美版于2005年10月,由北京体育大学出版社正式出版,在中国大陆与高球爱好者们见面了。
该套书采用十六开版本,《高尔夫长打绝招》与《高尔夫短打秘笈》是本套专著的技法,是结合体力与脑力的高度发挥。《高尔夫长打绝招》与《高尔夫短打秘笈》二书,分别阐述高球挥杆的基本动作,以及近身短打的得分关键,是球友突破100-90-80-70…杆、充分享受高球乐趣的必备宝典。《高尔夫实战心法》是本套专著的心法,因此,这三本书是一套难得的高尔夫进阶教科书。

《高尔夫长打绝招》把候根(Ben 
Hogan)一生的绝学全部摘录在一起,系统地介绍了候根的长打五绝招。侯根是世界公认的高尔夫“圣人”,如今世界高尔夫选手与教练们仍然把他的“五绝招”奉为宝典。
侯根也是把挥杆动作标准化的第一人。《高尔夫长打绝招》,即搜罗了这位世界公认的高尔夫圣人侯根一生的高球绝学,经作者张建国以细腻科学方法分析,用轻松洗炼的文字,辅以美化的图案,阐述了侯根30年高球生涯的精华。
全书重点强调球技基本动作,分为握杆法、站姿和瞄球,提杆上挥挥杆法、下挥击球挥杆法,及万流归宗等五大绝招。招招精辟,是侯根面临任何压力下比赛时,挥杆也不会荒腔走板的秘诀。

《高尔夫短打秘笈》是国际高坛四大天王之一的瓦臣(Tom 
Watson)赖以成名的短打绝活的大公开。秘笈涵盖了练习方法、每一种高抛球、短切球、推杆、砂坑球的分解动作及解决之道等。瓦臣的全部短打绝招,将毫无保留,剖析呈现在球友面前。

《高尔夫实战心法》是作者多年呕心沥血之作。
全书分为三个部分:
第一部分是《高尔夫长打绝招》和《高尔夫短打秘笈》的成果验收,是这两本书的延续。
第二部分是“神游”。作者把当今世界上的一些极有特色、极美的球场用艺术的手法画成油画,将它们的特点和气氛以质感及色彩烘托出来,你可以依景随意设定自己的落球点,跃入书中挥杆。
第三部份才是心法,它是纯粹内省性的、启发性的、哲学性的。心法在全书中与神游配合,片段地穿插出现,以便读者完全吸收。它是一把一把的钥匙,能开启许多封尘已久的宝藏箱,也能释放出巨大的能量。你要一则一则的细心揣摩,将它运用在自己的球技上,甚至用在任何生活中、事业上的疑难杂症上。参悟心法的时候心要静,累了就可以回油画中去神游一会儿。

详细内容请登陆新浪网高尔夫频道----本哈要秘笈丛书连载
《高尔夫长打绝招》 170.00元/册。
《高尔夫短打秘笈》 160.00元/册。
《高尔夫实战心法》 150.00元/册。
每套合计480.00元,成套购买可九折优惠。
咨询电话:13661106282
订购邮箱: [EMAIL PROTECTED]
联系人:   李小姐

--- End Message ---
--- Begin Message ---
On 3/5/06, Paul Jinks <[EMAIL PROTECTED]> wrote:
> Hi everyone
>
> I'm thinking of getting an iBook for reasons not really to do with
> webbing but really need to  do occasional php/mysql stuff to justify the
> expense. I believe that they all come with an Apache testing server
> installed and wondered if anyone had any success with getting
> php/mysql/phpMyAdmin working on one of these machines.
>
> Thanks in advance
>
> Paul

You should be able to run it all without any problems - you'll
probably need to compile from source for php & mysql (maybe there are
mac packages available I have no idea) but I doubt you'll find any
issues.

--- End Message ---
--- Begin Message ---
Can anyone tell me why i am getting this message when trying to login to the 
admin section, i am running the script off my local machine.

Warning: session_register() [function.session-register]: Cannot send session 
cookie - headers already sent by (output started at 
C:\VertrigoServ\_htdocs\mytipperV4.1\settings.php:2) in 
C:\VertrigoServ\_htdocs\mytipperV4.1\checkadmin.php on line 44 

--- End Message ---
--- Begin Message ---
Can anyone tell me why i am getting this message when trying to login to the
admin section, i am running the script off my local machine.

Warning: session_register() [function.session-register]: Cannot send session
cookie - headers already sent by (output started at
C:\VertrigoServ\_htdocs\mytipperV4.1\settings.php:2) in
C:\VertrigoServ\_htdocs\mytipperV4.1\checkadmin.php on line 44

--- End Message ---
--- Begin Message ---
On 3/5/06, Mark <[EMAIL PROTECTED]> wrote:
> Can anyone tell me why i am getting this message when trying to login to the
> admin section, i am running the script off my local machine.
>
> Warning: session_register() [function.session-register]: Cannot send session
> cookie - headers already sent by (output started at
> C:\VertrigoServ\_htdocs\mytipperV4.1\settings.php:2) in
> C:\VertrigoServ\_htdocs\mytipperV4.1\checkadmin.php on line 44

It tells you the problem:

output started at C:\VertrigoServ\_htdocs\mytipperV4.1\settings.php:2

Maybe there's a space or blank line before a php open tag?

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
R O B said:

That Rod guy, he's such a card! I'd add something, but Jay has already
covered my list in a more recent email than this one to which I'm
responding :)

jblanchard (who I think is Rod) said:

A SQL question on a PHP mailing list usually gets more than ribbing. ;)

No harm done -- I been hammered much worse and occasionally for good reason.

But you're right, I should have directed my question to a mysql group. I just joined and expanded an ongoing thread on this subject.

However, my apologies to the group for going off-PHP just one more time.

For sake of argument, let's agree that renumbering dB's is not a good idea -- so if you want to sequentially step through the records, then how do you do it?

Thanks -- I do appreciate the feedback (even ribbing).

tedd
--
--------------------------------------------------------------------------------
http://sperling.com

--- End Message ---
--- Begin Message ---
On 3/6/06, tedd <[EMAIL PROTECTED]> wrote:
> R O B said:
>
> >That Rod guy, he's such a card! I'd add something, but Jay has already
> >covered my list in a more recent email than this one to which I'm
> >responding :)
>
> jblanchard (who I think is Rod) said:
>
> >A SQL question on a PHP mailing list usually gets more than ribbing. ;)
>
> No harm done -- I been hammered much worse and occasionally for good reason.
>
> But you're right, I should have directed my question to a mysql
> group. I just joined and expanded an ongoing thread on this subject.
>
> However, my apologies to the group for going off-PHP just one more time.
>
> For sake of argument, let's agree that renumbering dB's is not a good
> idea -- so if you want to sequentially step through the records, then
> how do you do it?


The simplest example (most recent to oldest):

select * from table order by datefield desc;


To get them in the order they were entered:

select * from table order by id asc;


To get them in reverse order:

select * from table order by id desc;


Depends what data you have and what you are trying to do exactly.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Hi all,

ls there anyway I can set the date to the timezone of the clients
timezone?  For example, if a person opens the web page at 3/6 12:01
EST and another person opens the same page at 3/5 10:01 MST I would
like the date to be the above days on the client computers.  I know
everyone knows this but the way I described this the two people
accessed the webpage at the same time but I want the correct date for
the client computer to be outputted.

Thank you,

Paul

Paul:

You might look into strftime()

Also:

http://www.weberdev.com/get_example-3289.html
http://www.weberdev.com/get_example-471.html


tedd
--
--------------------------------------------------------------------------------
http://sperling.com

--- End Message ---
--- Begin Message ---
Hi
i would like to make a script to import contact list from msn, yahoo
and gmail instant messenger.
any ideas or tutorial on how to do that.
any help will be appreciated
thanks in advance

--
Ahmed Abdel-Aliem
Web Developer
www.SafariStudio.net
+20101108551
registered Linux user number 382789

--- End Message ---

Reply via email to