This table is where fields defined by the user are stored. Every field is a row within the table, with column headings of field_name, field_value, listingsdbelements_id (auto-incremented), listingsdb_id, and user_id.
The application deals with real estate listings, so fields might be number...
Actually, no. I found lots of references to unique constraint, but none that looked like they explain your suggestion. At any rate, thanks for your reply.
Thanks for your reply. I may have misunderstood though, as the target table might already have 30 rows with the same listingsdb_id. I'm not understanding the unique constraint.
Hi,
I want to insert one row per each value of listingsdb_id into a table with the following fields:
field_name, field_value, listingsdbelements_id, listingsdb_id, user_id
There are an unknown and variable number of rows already in this table for each unique listingsdb_id. I've tried the...
I am stumped as to how to make this work. I have the following elements:
UPDATE default_en_listingsdb as r1
INNER
JOIN default_en_listingsdbelements as r2
ON r2.listingsdb_id = r1.listingsdb_id
AND r2.listingsdbelements_field_name = 'MLSID'
AND r2.listingsdbelements_field_value...
Thanks very much folks. As Feherke says, jpadie's code showed me the problem.
When I ran my code, I saw numbers 2 through 7, which are from a mysql column named userdb_id. I would either test the value of $data[2] outside the loop or assign the value of $data[$i] to another array within the...
I'm new to PHP programming and am having trouble with variable scope. If I echo the value of $data within the following loop, I get the expected values. How can I transfer those values to an array that I can access outside the loop?
while ($data = mysql_fetch_array($result)) {
for ($i=0...
When I run a php program from its gui interface, it operates correctly. When run from cron, it works properly except that it fails to unlink and rewrite a batch configuration file (to update the last date/time run) saying permission denied.
Can anyone tell me how to get a this to run with my...
The information is stored in the db as a pipe-separated text field. The program formats it to a bullet list, which is fine for the area it is intended for. If I put that field on another page, it gets no formatting. There are several such fields. The output buffer sounds promising since I...
Hi,
I'm new to php programming and am looking for ideas. I am working with a program that generates web pages from database information using templated forms. Some of the database fields contain options that are formatted as a bulleted list in certain areas of the page, but as pipe separated...
Yes, or ... Substituting join in all instances finds few rows - I thought too few - but they meet all the criteria, where the other appears to include rows that meet some but not all.
I want to change the listingsdb_featured value for records returned by this query to 'yes'. I was hoping to use update, but haven't found a working syntax. Can anyone assist?
SELECT listingsdb_featured from default_en_listingsdb as r1
LEFT OUTER JOIN default_classlistingsdb as r4
ON...
I would like to display the latest UTC date/time value in my db as the date/time it would have been in my time zone. The following returns null. Can anyone tell me what is wrong with the query. Perhaps it is that I'm not referencing the time zones correctly, but I couldn't find how to...
Hi,
The primary key for this table is an auto-incremented field called listingsdbelements_id.
I want to concatenate (streetnumber,streetdirection,streetname,streetsuffix)from the following query into an address field. I was looking at...
When I looked again at the table, I saw that r# joined r1 on listingsdbelements_id rather than listingsdb_id. With that changed, it worked fine. Thanks again.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.