You're really asking a database design question, and it can be answered
only by asking more questions.
The first has to be how much do you know about relational databases? The
basic theory on normalization, simple queries, etc., covers about 6~10
pages. There are some very good tutorials on t
Viper1 wrote:
> I am trying to use the phpmyadmin to create an online resume site. I have
> created a table and it seems to be fine but I need some more help on the
> next steps also how to test the database out. I started by making a table
> called resumes # of fields is 11 first field is name v
I am trying to use the phpmyadmin to create an online resume site. I have
created a table and it seems to be fine but I need some more help on the
next steps also how to test the database out. I started by making a table
called resumes # of fields is 11 first field is name var is 20 and so on.
Can
select substring_index(date_record,"-",1)+id as sum from test order by sum
--
Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com
"Thomas "Omega" Henning" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROT
A quick rewrite of your code:
";
}
?>
Your question was how to print the query, in this case you'd just print
$sql. That was the point of the above but I got a bit carried away :) Oh,
mysql_error() can be very useful for debugging. Regarding the type
resource, have a look here:
http://ww
You have to execute the query, like so:
mysql_query( $sql );
placing this after the code which creates $sql.
Also check that your datatypes match, it's often worthwhile echoign $sql so
you can see exactly what it contains.
Regards - Miles Thompson
At 01:52 PM 1/3/2002 -0500, James Kupernik wro
Not as I understand the docs. Very few relational databases do.
Miles Thompson
At 10:52 AM 1/3/2002 -0800, olinux wrote:
>Does mysql not support deletes from multiple tables?
>
>[ie] DELETE FROM vendors, billing WHERE vendors.v_id =
>'1' AND vendors.vb_id = billing.b_id
>
>Thanks much,
>olinux
Oh YEAH!! it work!! YEHEY!!
yahoo!!!
thanks rick! =)
louie
- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "'louie miranda'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 04, 2002 4:51 AM
Subject: RE: [PHP-DB] printing php variable into html > print
You must extract the results of the query row-by-row.
while( $row = mysql_fetch_array($result) )
{
print "ircname:".$row['ircname']."";
print "email:".$row['email']."";
print "realname:".$row['realname'].".";
print "asl:".$row['asl']."";
print "info:".$row[
The query itself is built dynamically from form input, but I did get it
resolved. I don't know why, but with dos carage returns, it just didn't work.
Thanks for your thoughts.
On Thursday 03 January 2002 01:40 pm, Rick Emery wrote:
> That's what I wondered about.
>
> How are you building the SE
Hi, is it possible to print the sql query? i mean
i want to print the output of the command "SELECT * FROM members;"
and output it into html, i tried
print $result; -- it gives me different output..
> Resource id #2
ty,
louie...
# PHP SCRIPT ###
yes, but anyway it work. :) ty..
- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "'louie miranda'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 04, 2002 4:26 AM
Subject: RE: [PHP-DB] Re: [PHP] php+mysql simple query help me pls! ty.
> Specifying "this"
That's what I wondered about.
How are you building the SELECT statement. I would have thought it'd be:
$query = "select lead.lead_id, lead.firstname, lead.lastname,
lead_support_1.plusfour from lead left join lead_support_1 on
lead.lead_support_id = lead_support_1_id"
-Original Message-
I saved the query to a file, did a diff, and it does have one difference:
there are DOS newlines in the string. Could that do it? Do you know how to
strip those out?
On Thursday 03 January 2002 11:40 am, Rick Emery wrote:
> So show us the print out when you printed $sql. I'm certain it did not
Specifying "this" doesn't matter. That would only equal TRUE or FALSE (per
the manual). Your problem lies elsewhere.
-Original Message-
From: louie miranda [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 2:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: [PHP] php+mysql si
yes, i forgot something,
this = mysql_select_db("mydb",$db);
i did not specify my db name.
thanks :)
louie
- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "'louie miranda'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, January 04,
It does/did. I add this print statement:
$result = mysql_query($sql) || $err = 1;
print "$sql\n";
And it yields this:
select
lead.lead_id,
lead.firstname,
lead.lastname,
lead_support_1.area_code
from
lead
left join lead_support_1 on lead.lead_supp
I think you need while loop here.
>
> $result = mysql_query("SELECT * FROM members",$db);
while ( $row =mysql_fetch_object($result))
{
>
> printf("ircname: %sn", mysql_result($result,0,"ircname"));
> printf("email: %sn", mysql_result($result,0,"email"));
> printf("realname: %sn", mysql_result
Test the mysql_query() return value:
$result = mysql_query("SELECT * FROM members") or
die("Error:".mysql_error());
there may be an error in your query.
-Original Message-
From: louie miranda [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 1:59 PM
To: [EMAIL PROTECTED]
Cc: [E
Hi, can someone help me here! :(
I can't query the data on my sql from php.
db is fine, i couldnt see the prob in php!
pls help, ty.
# MSQL ###
mysql> desc members;
+--+-+--+-+-++
| Field
My date is like -MM-DD
as to the select you posted that selects only those to i need it ordered by
the sum of these to fields
Thomas "omega" Henning
"George Nicolae" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have some idea about your problem but to
test
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Multiple-table delete was implemented with MYSQL vers 4.0
-Original Message-
From: olinux [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 12:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Deleting form multiple tables
Does mysql not support deletes from multiple tables?
[ie]
check if all your fields are indeed strings (char, varchar) and not
numbers.
Mihail Bota
On Thu, 3 Jan 2002, James Kupernik wrote:
> I'm trying to input that data entered into a form into a table in my DB.
> Here is the code I have.
>
> $db = mysql_connect("localhost","cloft","spring");
>
>
Are you even calling the mysql_query() function?
Should look something like this:
Mysql_connect("localhost","cloft","spring");
mysql_select_db("countryloft");
$sql = "INSERT INTO catalogreq
(BFNAME,BLNAME,ADD1,ADD2,BCITY,BZIPA,BSTATE,BCTRY,BTELO,DATE) VALUES
('$BFNAME','$BLNAME','$BADD1','$BADD
I'm trying to input that data entered into a form into a table in my DB.
Here is the code I have.
$db = mysql_connect("localhost","cloft","spring");
mysql_select_db("countryloft",$db);
$sql = "INSERT INTO catalogreq
(BFNAME,BLNAME,ADD1,ADD2,BCITY,BZIPA,BSTATE,BCTRY,BTELO,DATE) VALUES
('$BFN
Does mysql not support deletes from multiple tables?
[ie] DELETE FROM vendors, billing WHERE vendors.v_id =
'1' AND vendors.vb_id = billing.b_id
Thanks much,
olinux
__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.
So show us the print out when you printed $sql. I'm certain it did not look
like:
select
lead.lead_id,
lead.firstname,
lead.lastname,
lead_support_1.plusfour
from
lead
left join lead_support_1 on lead.lead_support_id = lead_support_1_id
But rather,
Yes, I copied it verbatium and copied it right from the HTML source into this
email.
On Thursday 03 January 2002 11:22 am, Rick Emery wrote:
> Have you actually print out $sql before its execution then
> copied-and-pasted it to the MYSQL command line.
> Or are you assuming that because you typed
Have you actually print out $sql before its execution then copied-and-pasted
it to the MYSQL command line.
Or are you assuming that because you typed it into the MYSQL command line,
then it must be correct?
-Original Message-
From: Ken Kinder [mailto:[EMAIL PROTECTED]]
Sent: Thursday, Jan
Kelvin,
As I asked before: WHAT DATABASE ENGINE ARE YOU USING?
-Original Message-
From: Kelvn Yip [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 11:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Need Help Please
I have deleted all the info. from the Table by mistaken.
Now,
I have deleted all the info. from the Table by mistaken.
Now, I need to rollback all the info. otherwise, none of the user can login
to a page.
Please..Help I don't know how to rollback.
Can someone provide me a complete code , So, I can put up the DB online
asap.
Thanks.
Kelvin.
--
PHP
This is extremely annoying. For some reason, mysql_query seems to be
confusing my left join for an insert or update. The reason being, that the
query runs fine, but the result isn't usable. Here's the example code. Table
definitions are below if that helps.
$err = 0;
// $result = mysql_query("
Kelvin,
Backup is your friend, I hope you have one.
The only way you can implement a rollback is if you use transactions in
your code. In general terms it works like this ...
Begin transaction
SQL processing ,etc.
If no errors
Commit transaction
else
Rollback
End tra
SomeOne Please Help
Thanks.
Kelvin.
"Kelvn" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have deleted the DB by mistake. Please I don't know how to write the
> rollback statement.
>
> I need complete code from you guys. Please Help Quick.
>
> Thanks
my company would like to develop a job site similar to
monster.com or hotjobs.com -
Basically it would allow users to post resumes,
employers post jobs and be searchable by multiple
fields.
What is the cost
1] if it is custom developed for us
2] if we use an - "off the shelf" solution (I was
un
I have deleted the DB by mistake. Please I don't know how to write the
rollback statement.
I need complete code from you guys. Please Help Quick.
Thanks
Kelvin. ( I used PHP and MYSQL )
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad
Please note that "" (empty string) and NULL is not the same value.
The following query will return records where x is not null:
SELECT * FROM db WHERE x IS NOT NULL;
But since "" and NULL is different values, it might just as well return
empty strings.
If you want records where x actually co
In my database (Sybase) that won't work. You have to use
not like 'NULL'
or it gives an error about not using text in a where clause unless you use
like. Weird, but it will work with the not like 'NULL'.
-Natalie
> -Original Message-
> From: Jonathan Hilgeman [SMTP:[EMAIL PROTECTED
...WHERE some_column IS NOT NULL;
- Jonathan
-Original Message-
From: bill [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 8:19 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] finding records wiht non-null columns
Is there a better query than
SELECT *
FROM some_database
WHERE s
Is there a better query than
SELECT *
FROM some_database
WHERE some_column <> ""
I had tried
WHERE some_column <> NULL but that didn't work.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To cont
I have some idea about your problem but to solve I need some information.
1. you have a datatime, data, timestamp,time or year column?
if you have a data type column with -mm-dd format you can use the
following query
select substring_index(date_record,"-",1)+id from test
date_record is a da
Looks like an uploaded file...
(Did you make a page that lets you upload the file then run it into your
table?)
Upload the file manually, chmod it to 777 or whatever...
But when you uploaded it, the file has your default read/write permissions
that should work within mysql.
Then you should be abl
Am retrieveing an "available" ipaddress from a table, then later trying to
perform an update to "assign" the address to an id. The update produces no
error, but doesn't update either. Must be overlooking something but can't place
a finger on it.
Table "host_ipaddress"
Attribute | Type |
Do you have control over where the file to be loaded is located? If so,
simply create a directory in your user's home, and do what the error message
says :-)
HTH
Bogdan
Hayan Al Mamoun wrote:
> I have this error when I try to execute "Load Data Infile .. "
> statement, although temp directory
Sorry but I don't have the query done yet . But maybe later I will have it
done but I don't know how to use the substr command in mySQL . If you tell
me how to use it I will post it on the forum.
Thomas "omega" Henning
"George Nicolae" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:
Hello,
Clear - coding has 16 characters - you have defined usrpassword in the
second DB for 15 - probably one character is missing with coding.
I am rather sure it is the problem, if not - sorry to disturb you
Regards,
Petr.
-Original Message-
From: Matthew Tedder [mailto:[EMAIL PR
Can someone please explain this to me?! It's a real puzzle..
Using the "password('abc')" command in a MySQL insert statement works for me
but using it again in a select statement does not. Well--it does in one
MySQL database I have but doesn't in another one. I've done exactly the same
thi
and who looks the query with "substr the date so i get only the year"? Type
the exact query you make.
--
Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com
"Thomas "Omega" Henning" <[EMAIL PROTECTED]> wrote in message
[EMAIL PR
49 matches
Mail list logo