Jump to content

INSER INTO SELECT troubles


wookie

Recommended Posts

Its likely you need to specify a WHERE clause. Can we see your query?

 

Sure you can..

 

$query1 = mysql_query("INSERT INTO stev1965_smf14.listing (topl) SELECT url FROM stev1965_smf14.details WHERE position = 0") or die("Error: ".mysql_error());

 

The above query makes many new rows, each with a "url" in the collumn "topl", I need all the url's to be in one field in one row if its possible.

 

Regards

 

Wookie

The third party script I'm using is an autopost script that posts to a forum, this script can only run one query and post its results, hence why I'm making another table and condensing results to that. This is why I require all the urls in one field on one row.

HTH

 

Wookie

this script can only run one query and post its results

 

Surely you can alter this script do perform more than 1 query. I think i'm also missing the point when you're saying you need all this information in 1 row. You're making a post to a forum, i figured that, but how is this "post" being processed? This 3rd party script is doing what? Connecting to your DB and querying for information? Are you giving it a string? Does it take a string? Are you executing any SQL yourself?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.