<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I think you need a *_schema() definition to use drupal_write_record<br>
I'd try db_insert("new_admin")->...<br>
<br>
Bye<br>
<br>
Il 29/02/2012 10:39, Kokou Afidegnon ha scritto:
<blockquote
cite="mid:CAGcmBVXLtr5tXkYLZ0vF1pJD4_vJT=HbF0mLBsMLP+4R9atr+Q@mail.gmail.com"
type="cite">
<div>Hi, Good morning, </div>
<div><br>
</div>
<div>I am tryingto apply a conditional action on my drupal, page.
by applying this conditional action with the following custom
php to add an entry to the database, but unfortunately, no entry
is being submitted. and there is no returning error too. can you
please assist? </div>
<div><br>
</div>
<div>here is the custom php I have added. </div>
<div><br>
</div>
<div>$result = db_query_range('SELECT*FROM users AS u LEFT JOIN
profile_values AS pv ON u.uid = pv.uid WHERE u.uid = %d',
$order->uid, 0, 10);</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> </div>
<div> while ($res = db_fetch_object($result)) {</div>
<div>$data = array(</div>
<div>'id' => '',</div>
<div>'reqadm_login' => $res->name,</div>
<div>'reqadm_pass' => $res->pass,</div>
<div>'domain_name' => $res->value,</div>
<div>'family_name' => $order->billing_first_name,</div>
<div>'first_name' => $order->billing_last_name,</div>
<div>'comp_name' => $order->billing_company,</div>
<div>'iscomp' => 'yes',</div>
<div>'email' => $order->primary_email,</div>
<div>'phone' => $order->billing_phone,</div>
<div>'addr1' => $order->billing_street1,</div>
<div>'addr2' => $order->billing_street2,</div>
<div>'zipcode' => $order->billing_postal_code,</div>
<div>'city' => $order->billing_city,</div>
<div>'country' => $order->billing_country,</div>
<div>'paiement_id' => $order->order_id,</div>
<div>'product_id' => $order->,</div>
<div>'shopper_ip' => $order->host,</div>
<div>'date' => $nowdate,</div>
<div>'time' => $nowtime,</div>
<div>'add_service' => 'yes'</div>
<div> );</div>
<div> drupal_write_record('new_admin', $data);</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
</body>
</html>