Reply
Some quick database interaction questions
Old 03-26-2008, 01:01 PM Some quick database interaction questions
amw_drizz's Avatar
Ultra Talker

Posts: 301
Name: Jon
Location: New York
When I look at some scripts I see %s in the script or something with the % at the beginning of it.

When googling it didn't turn much up.

What is the %s used for?
__________________
AMW_Drizz
Php 5.2 Mysql 4.1 IIS 6 Win2k3 Server && PHP 5.2 MySQL 4.1 Apache 2.2 (separate machine of course)
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
Sponsored Links (We share ad revenue):
 
Old 03-26-2008, 07:33 PM Re: Some quick database interaction questions
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Welcome to Van SEO Design
Posts: 8,040
Name: Steven Bradley
Location: Boulder, Colorado
I'm guessing you saw it in a sprintf() statement or something similar. sprintf is a way to format what you want to print.

The %s is a placeholder in the string being printed and a variable is given at the end of the sprintf statement that will get placed where that placeholder is located.

There are different kinds of % arguments you can use and they're listed in the link to the function above. %s is for a string.

The link to the sprintf function will explain it all better than I am and there are a few other similar functions.
__________________
l Search Engine Friendly Web Design | Van SEO Design
l Tips On Marketing, SEO, Design, and Development | TheVanBlog
l Custom WordPress Themes
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 03-27-2008, 03:13 PM Re: Some quick database interaction questions
amw_drizz's Avatar
Ultra Talker

Posts: 301
Name: Jon
Location: New York
yea i found about sprintf function. that is what i was looking for
__________________
AMW_Drizz
Php 5.2 Mysql 4.1 IIS 6 Win2k3 Server && PHP 5.2 MySQL 4.1 Apache 2.2 (separate machine of course)
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
Old 03-27-2008, 06:54 PM Re: Some quick database interaction questions
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Welcome to Van SEO Design
Posts: 8,040
Name: Steven Bradley
Location: Boulder, Colorado
Glad I could point you in the right direction.
__________________
l Search Engine Friendly Web Design | Van SEO Design
l Tips On Marketing, SEO, Design, and Development | TheVanBlog
l Custom WordPress Themes
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Sponsored Links (We share ad revenue):
 
Reply     « Reply to Some quick database interaction questions
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML


Page generated in 0.16753 seconds with 14 queries