I have a MYSQL database and I would like to add new campaign for each row I 
have in the MYSQL table.
The code below creates only one campaign, but I want to create multiple 
campaigns e.g. each row in the table should be used to create new campaign, 
please advise.

    // Create connection
    $conn = mysqli_connect($servername, $username, $password, $dbname);
    // Check connection

    $sql = "SELECT * FROM table";
        $result = $conn->query($sql);
        
        
    while($row = $result->fetch_assoc()) {
             
        // Create a campaign with required and optional settings.
        $campaign = new Campaign();
        $campaign->setName($row["name"]. uniqid());
        $campaign->setAdvertisingChannelType(AdvertisingChannelType::SEARCH
);

        
        
        }


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/94c35eeb-4ba2-47ea-8bec-5a4f7a76bd94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Create ... T.H
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to