1
rts2271
Big dumb question of the week
  • 2005/4/11 15:52

  • rts2271

  • Just popping in

  • Posts: 10

  • Since: 2004/5/26


In moving from COBOL and MVS to procedural PHP and now to Object based PHP I have found my code to be a bit bulky. It has gotten much better and now my module project is now pretty close to something I might not be ashamed to let someone else look at.

Theres a particular piece of code related to a MySQL query I am having problems digesting.

$sql = sprintf('UPDATE %s SET sess_updated = %u, sess_data = %s WHERE sess_id = %s', $this->db->prefix('session'), time(), $this->db->quoteString($sess_data), $sess_id);

Im using this as a example case it was on my desktop at the time.

The Dumb question of the day

What do the %s and %u represent, Where are they set or am I looking at this query from too literal a view.

2
Mithrandir
Re: Big dumb question of the week

nothing to do with the query as such. It is a string manipulation function that is used.

sprintf reference in PHP manual

3
rts2271
Re: Big dumb question of the week
  • 2005/4/11 16:32

  • rts2271

  • Just popping in

  • Posts: 10

  • Since: 2004/5/26


Thank you so so so very much. Thats been bugging me for nearly a year but hasnt been a issue I've wanted to tend to until now.

Login

Who's Online

242 user(s) are online (117 user(s) are browsing Support Forums)


Members: 0


Guests: 242


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits