473,698 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Two simple questions... with reagrd to PHP and MySQL

Hi,

TIA...

1) Need to select all rows from table called fixtures where home_team and
away_team is equal to team_code. What SQL select statement would do this?

2) I have a variable called fixture_date in the format dd-MMM-yy (i.e.
02-Mar-05) how do I select the day/month/year into thier own variables using
PHP?

Thanks
Andy Mak
Jul 17 '05 #1
14 1819
Domestos wrote:
Hi,

TIA...

1) Need to select all rows from table called fixtures where home_team and
away_team is equal to team_code. What SQL select statement would do this?

What about reading SQL basics?

SELECT * FROM fixture WHERE away_team=team_ code OR home_team=team_ code

2) I have a variable called fixture_date in the format dd-MMM-yy (i.e.
02-Mar-05) how do I select the day/month/year into thier own variables using
PHP?
Have a look at strtotime() in the php manual.

Regards
Stefan

Thanks
Andy Mak

Jul 17 '05 #2
> What about reading SQL basics?

Reasons why i prefer to ask in here...

1) I get an answer to my question in minutes, you guys are great.
2) I don;t have to search around the internet spending time reading pages
upon pages that mean nothing to me to find a minute bit of detail spending
30 minutes
3) After trying the example on the web page they either don't work or have
missing/non understandable code in them
4) Which takes me back to asking the question in here but 30 minutes down
the line
5) 'cos you love helping people else you wouldn't answer my questions :)

Thanks

Andy Mak

Jul 17 '05 #3
| Reasons why i prefer to ask in here...
|
| 1) I get an answer to my question in minutes, you guys are great.
| 2) I don;t have to search around the internet spending time reading pages
| upon pages that mean nothing to me to find a minute bit of detail spending
| 30 minutes
| 3) After trying the example on the web page they either don't work or have
| missing/non understandable code in them
| 4) Which takes me back to asking the question in here but 30 minutes down
| the line
| 5) 'cos you love helping people else you wouldn't answer my questions :)

reasons why you won't get a response or will be plonked...

1. asking questions one is obviously too lazy to rtfm to answer.
2. wasting everyone's time asking noob questions when the answer is *IN* the
gdfm instead of rtfm in the first place.
3. referring to "examples" that don't work without a reference either to it
or posting one's OWN non-functional code so we can clear up ONE's inability
to understand it. (my suspicion being that the fault is yours and NOT any
other code to which you refer!).
4. insisting that asking noob questions w/o first trying to resolve an issue
one's self is the BEST way to get an answer or solution to a problem.
5. 'cos one believes a response to said question(s) was aimed at HELPING one
out of one's dilemma RATHER THAN taking it - as the rest of us do - as a
blatant insult to the POSTER in the solution's OBVIOUS simplicity!

your assumptions are grossly inaccurate and illogical...whi ch are wholly
what software developers LOATH !!!

RTFM !!!
Jul 17 '05 #4

reasons why you won't get a response or will be plonked...

1. asking questions one is obviously too lazy to rtfm to answer.
2. wasting everyone's time asking noob questions when the answer is *IN* the gdfm instead of rtfm in the first place.
3. referring to "examples" that don't work without a reference either to it or posting one's OWN non-functional code so we can clear up ONE's inability to understand it. (my suspicion being that the fault is yours and NOT any
other code to which you refer!).
4. insisting that asking noob questions w/o first trying to resolve an issue one's self is the BEST way to get an answer or solution to a problem.
5. 'cos one believes a response to said question(s) was aimed at HELPING one out of one's dilemma RATHER THAN taking it - as the rest of us do - as a
blatant insult to the POSTER in the solution's OBVIOUS simplicity!

your assumptions are grossly inaccurate and illogical...whi ch are wholly
what software developers LOATH !!!

RTFM !!!


Steve,

when one is a novice and is trying to get the job done in the least amount
of time without having to wade through pages and pages of crap and unrelated
muck that google chucks up is that not a better use of ones time?

Thanks
Andy Mak
Jul 17 '05 #5
I found the tutorial on the mysql site a very worthwhile half an hour

http://dev.mysql.com/doc/mysql/en/tutorial.html

Jul 17 '05 #6

<pe**********@y ahoo.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
I found the tutorial on the mysql site a very worthwhile half an hour

http://dev.mysql.com/doc/mysql/en/tutorial.html


Now you see - that is what I am after - but i'm just to lazy and crap at
searching to find somthing like that...

Andy Mak
Jul 17 '05 #7
hmmmm...php.net ; mysql.com.

hardly a vision quest, now is it!

if they hired you to do this quick/dirty program, they've obviously failed
before you began to work on it.

but that discussion is for another day.
"Domestos" <ne*******@mind .net> wrote in message
news:N2******** **********@news fe4-gui.ntli.net...
|
| >
| > reasons why you won't get a response or will be plonked...
| >
| > 1. asking questions one is obviously too lazy to rtfm to answer.
| > 2. wasting everyone's time asking noob questions when the answer is *IN*
| the
| > gdfm instead of rtfm in the first place.
| > 3. referring to "examples" that don't work without a reference either to
| it
| > or posting one's OWN non-functional code so we can clear up ONE's
| inability
| > to understand it. (my suspicion being that the fault is yours and NOT
any
| > other code to which you refer!).
| > 4. insisting that asking noob questions w/o first trying to resolve an
| issue
| > one's self is the BEST way to get an answer or solution to a problem.
| > 5. 'cos one believes a response to said question(s) was aimed at HELPING
| one
| > out of one's dilemma RATHER THAN taking it - as the rest of us do - as a
| > blatant insult to the POSTER in the solution's OBVIOUS simplicity!
| >
| > your assumptions are grossly inaccurate and illogical...whi ch are wholly
| > what software developers LOATH !!!
| >
| > RTFM !!!
| >
| >
|
| Steve,
|
| when one is a novice and is trying to get the job done in the least amount
| of time without having to wade through pages and pages of crap and
unrelated
| muck that google chucks up is that not a better use of ones time?
|
| Thanks
| Andy Mak
|
|
Jul 17 '05 #8
| Now you see - that is what I am after - but i'm just to lazy and crap at
| searching to find somthing like that...

BINGO !!!

the truth exposed..."i'm just to[o] lazy and crap[y] at searching to find
something like that".
Jul 17 '05 #9
Domestos wrote:


Steve,

when one is a novice and is trying to get the job done in the least
amount of time without having to wade through pages and pages of crap
and unrelated muck that google chucks up is that not a better use of
ones time?


First of all, there is the MySQL manual. Second, there are dozens of books
covering the subject.

If you were to take 30 minutes reading the first couple chapters of one, you
wouldn't even have to spend the time waiting for a response here.

So, in the interest of saving time (the time saved reading the manual or a
basic primer on MySQL - maybe a couple hours or so), you end up wasting even
more time (the time spent waiting for a response here, EVERY time you have a
question - eventually adding up to many hours).

Yep, sounds really efficient to me...

--
Tony Garcia
Web Right! Development
Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
2113
by: Dimitris | last post by:
Hi folks... As part of an assignment, I have to design and implement a fairly small MYSQL 4.0.17 database for a fictitious travel agency. This database will store data from customers submitting it through application forms. I will test my implementation on an old Linux box (RedHat 6.x with PHP 4.0.5 and MySQL 4.0.17, running on an AMD processor and 64MB of memory). Each APPLICATION form will have 4 parts:
2
2102
by: David List | last post by:
I posed a MySQL C API question a few days back here, and got zero answers. I assume it is because this is not the right place to ask such questions. Does anyone here know where I could ask C API questions? I haven't been able to find a mailing list or newsgroup specifically dealing with the MySQL C API. -- Med venlig hilsen / Best regards
1
1715
by: yiyun | last post by:
Hi, I am new to mysql and I want to ask a simple questions. I would like to initialize my InnoDB table space and I configure like below: innodb_data_file_path=ibdata1:1024M;ibdata2:64M:autoextend:max:1024M My questions are:
27
4613
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res = $doc->loadHTMLFile("./aBasicSearchResult.html"); if ( $res == true ) { $zip = $doc->getElementById('zipRaw_id')->value; if ( 0 != $zip ) {
1
1583
by: E.T. Grey | last post by:
Hi All, Despite spending the past six to seven hours perusing the docs on the mySQl site, I still have questions unanswered, and have been unable to get any help. I am familiar with Sybase, some Oracle and PostgreSQL - but the mySQL SQL seems a bit "non-standard". I would be very grateful for any help I get in answering these questions: Stored procedures
1
1639
by: E.T. Grey | last post by:
I have been busting my nut over this for pretty much most of the day and it is driving me nuts. I posted this to an mySQL ng yesterday and I have not had any response (I'm pulling my hair out here). Its really a very simple stored procedure but I simply can't seem to get it to work. I have a simple table misc_data described as ff: +-------+------------------+------+-----+---------+-------+
7
3771
by: Ivan Marsh | last post by:
Hey Folks, I'm having a heck of a time wrapping mind around AJAX. Anyone know of a simple, straight-forward example for pulling a simple query from mysql with PHP using AJAX? As I understand it I need a PHP script that pulls the query and dumps the data into XML format, that is called by triggering a javascript event that reads that file with XMLhttprequest.
4
3042
by: yogesh | last post by:
mysql in c++ initialize error occurs a simple program is executed in redhat9.0 , using gcc 3.2.2 compiler version ... #include <stdio.h> #include <mysql.h> #include <string.h> int main() {
4
1615
by: Andrey | last post by:
Hi, I will be hiring a php guru to help us architect a highly scalable web site/web application; the problem is I am coming from Microsoft .NET world and not too much familiar with the platform. What kinds of questions would you advice to ask the person on the interview to see if he/she is: 1. Proficient with php 2. Proficient with MySQL (development, maybe some administration) 3. Has web app architecture skills and knows how to build...
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.