Hello,
I have two mysql tables songs and artists. They look like this:
CREATE TABLE `artists` (
`artist_id` int(10) unsigned NOT NULL auto_increment,
`artist_name` varchar(100) default NULL,
`artist_img` varchar(50) default NULL,
PRIMARY KEY (`artist_id`),
UNIQUE KEY `artist_name`
Hello,
I trying to put together a sql statement that will pull records based on
a date field. I can't figure out how to compare the date field to
multiple php variables. Something like this,
WHERE date_field != $date_1 OR $date_2 OR $date_3 etc. etc.
Thanks for the help.
Mike
--
PHP
Hello,
I'm looking at using md5() and mysql for user auth to some of the data
in a table. I found the following on the php md5 manual page,
$query = INSERT INTO user VALUES ('DummyUser',md5('DummyPassword'));
$password = md5($password);
$query = SELECT * FROM user WHERE username='DummyUser'
Hello,
I'm trying to get the values from a form post with multiple checkboxes
checked . Here is what I have,
if ($row = mysql_fetch_array($result));
do {
input type=checkbox name=class_id[] value=$row[class_id] $row[name]
}while ($row = mysql_fetch_array($result));
Hello all,
I've been able to get the below to work pretty much. The only problem I
have is when there is an apostrophe in the data of one of the fields
like (You're the One). When this occurs nothing gets updated or
inserted(tried both). I've done other things from forms
inserting/updating
Hi,
I'm working on a event calendar and some events span more than one day. I would like
to store a date range like 2001-02-05 thru 2001-07-05 so when I do a query for the
current day the event would appear for all the days in the range. I hoping someone
can point me to some documentation or
Thanks for the help on the earlier ?. Now that I have the select statement working I
can't get any results displayed.
$result = mysql_query("SELECT substring_index(body, \".\" ,2) FROM news",$db) or die
("Invalid Query");
if ($myrow = mysql_fetch_array($result)) {
do {
I have a simple news manager and I would like to display the first two sentences of a
news story. I got this select statement from the mysql mailing list:
SELECT substring_index( body, ". ", 2) FROM news;
This works great from the mysql client but when I try it using php with this:
$result
Hello,
I'm trying to retrieve and output all the binary images in my images table. This is
what I have,
$result = mysql_query("SELECT * FROM images",$db);
if ($myrow = mysql_fetch_array($result)) {
// display list if there are records to display
do {
$filetype =
Hello,
I'm working on a news manager and would like to display records for
today,yesterday,last week, last month and so on. This is what I have so far,
$result = mysql_query("SELECT * FROM news WHERE timestamp=010325",$db);
if ($myrow = mysql_fetch_array($result)) {
Is there a way to do
Hello,
I'm new to PHP and mySQL. I'm trying to find more info on printf. Specifically
setting table properties, like height,width,background. Hoping someone can point me in
the right direction.
Thanks for the Help,
Mike
11 matches
Mail list logo