hi,
you have to create aliases for every column you want to fetch results from.
you have to change your query like this:
SELECT i1.img_path AS i1_path, i2.img_path AS i2_path, i3.
you can leave out the "AS" if you want to..
hth, bastian
> $result = mysql_query("SELECT * FROM photo_album as p
hi,
did you try
"...FROM labor RIGHT JOIN works_orders ON labor_ord_no =
works_orders_ord_no WHERE labor_qty='' ORDER BY labor_qty",$link);
?
i think that should do it
regards,
bastian
> How do I get the following select to exclude records where labor_qty from
> labor does not have a record?
hi,
you could do this with a join, but i experienced single querys to be faster if
you always have only one person_id to look for in person.
if it was many person_ids and your query would end like "...person_id in
(1,2,3, 9998)" a join would by faster, I guess.
feal free to correct me, if I'm
Hi,
why don't you write a script which simply gets all the data you need out of their
database and puts it into some arrays. then include the page on your website and
then you can work with the arrays as if they were on your server
HTH,
Bastian
--
PHP Database Mailing List (http://www.php.
Hi,
is it possible to get all possible values of an enum-field from a
mysql-table in php?
The values might be changed in the database. Now I've got an
select-field in my php-app where the user can select each value of the
enum-field for a new record befor saving...
Thanks for any reply,
Bastian
Hi,
there's an elegant way to stop people from uploading the infos more than one
time.
And it's easy to do. You just have to figure out which fields are not allowed to
have the same values and put those fields into an unique key.
ALTER TABLE projekt ADD UNIQUE(voornaam, achternaam, email)
would ju
to insert are already inserted. If you find some -> error,
if not -> put them in.
Ignatius is right: I forgot to mention that there mustn't be any duplicates in
the fields you want to add to the unique key.
HTH,
Bastian
>
> "Bastian Vogt" <[EMAIL PROTECTED]>
Hi,
in your query "strtoupper" is treated as a string and not as a function.
You have to write this:
mysql_query ("INSERT INTO anagrafe (codice,nome, cognome, codicefiscale)
VALUES
('".strtoupper($codicefiscale)."','$NOME','".strtoupper($cognome)."','".strtoupper($codicefiscale)."',
...
Regards,
Hi,
I'ld suggest this:
// inside your loop
$array[$year] += $value;
HTH,
Bastian
Martin Allan Jensen schrieb:
> Hi all,
>
> I have a problem i know you can help me with.
>
> I have this flushet out from a loop command:
> Year: 2000 & ID: 14 & Value: 300
> Year: 2002 & ID: 11 & Value: 640
> Y
> Lets say $year is 2000
> There is not defined index 2000 at $array.
> It is going to be undefined offset.
Hm... I think it's gonna work, but if it's one of the "don'ts" in
progamming style, could you tell me why you shouldn't do this and how to
make it better (and nice)?
Regards,
Bastian
--
Hi,
you could use "IN" in your query:
$sql = "select * from. where id in (0"// start your query
if (count($selection) >= 1) {
for ($i=0;$i Hi there everyone,
>
> I use the following code to collect date from multiple tickboxes on my form:
>
> if (count($selection) >= 1) {
> for ($i=0;
Hi,
first leave out the loop with "for ($i...)".
then use the loop with "while" and make sure that you create arrays. you're
currently filling the same variables with different results each time. the last
one always overwrites the ones bevor.
so add those brackets: []:
$dbRow['ev_id'][]= $row
Maybe you want to use "urlencode()"?!
hth,
Bastian
Alex Francis schrieb:
> I have the following code in my page as a header.
> if ($mainarea=="Language")
> {
> header("Location:add_5-14_material.php?mainarea=$mainarea");
> }
> else
> {
> }
> ?>
> When I echo $mainarea I get \'Language\'. I
> SELECT SUM(T1.F1) AS C1, SUM(T2.F1) AS C2 FROM T1, T2
Hi,
T1,T2 is a join of the two tables which means that you combine each value of T1 with
each value of T2. This is why you don't get the result you want. In your case I simply
would do two querys as it won't make any problems:
SELECT SUM T
Hi,
you have to write it exactly like this:
echo $_POST['fname'];
HTH,
Bastian
>
> echo $_post(fname)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>
> $sql2 = "INSERT INTO cal_date_map (entry_id, date) VALUES (\"$entry_id\",
> \"$val\")";
Where does $entry_id come from? Maybe it's unique?
Bastian
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Is there a way of getting from php the screen size?
Sorry but as php is only server-side, there is no way to get the screen
size. You have to use javascript and send the result to the page again, as
you suggested yourself.
Regards,
Bastian
--
PHP Database Mailing List (http://www.php.net/)
T
17 matches
Mail list logo